Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading values form data table
#7
Not Solved
Hi new4qtp,

Anirban is right. Link is the name of the class and you have to write it in your script.

And the way you are passing values to Browser, Page or Link doesn't work. You have to specify the properties for which you are storing the values in the data table.

Try to analyze the following,

Lets take the Google page as our example.
Suppose you want to click through the "Gmail" link in the Google page. The hierarchy to which we need to follow is like:
Browser().Page().Link().Click

Here for "Browser" and "Page" object, we have several properties like "name","title" etc. and for Link object we have "name" as a property along with many more.

Suppose you have stored the "name" of the Browser,Page, and Link object in your DataTable under "Browser","Page" and "Link" columns respectively.

Then retrieve the values like:
Code:
BrowserName = DataTable("Browser",dtLocalSheet)
PageName = DataTable("Page",dtLocalSheet)
LinkName = DataTable("Link",dtLocalSheet)

Now you can write like:

Code:
Browser("name:="&BrowserName).Page("name:="&PageName).Link("name:="&LinkName).Click

Note that here you are explicitly providing the object class and property and providing only values from the DataTable.

For this example, Browser and Page name is "Google" and Link name is "Gmail"

Hope you can understand now.
Reply


Messages In This Thread
Reading values form data table - by new4qtp - 08-02-2010, 02:02 PM
RE: Reading values form data table - by new4qtp - 08-02-2010, 02:12 PM
RE: Reading values form data table - by new4qtp - 08-02-2010, 02:43 PM
RE: Reading values form data table - by PrabhatN - 08-02-2010, 04:24 PM
RE: Reading values form data table - by new4qtp - 08-02-2010, 04:55 PM
RE: Reading values form data table - by PrabhatN - 08-02-2010, 05:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,736 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Can we test Salesforce Standard form using QTP? yona34 0 1,144 05-22-2018, 10:57 AM
Last Post: yona34
  Reading Value from Java Table arjun.singh 8 24,767 10-11-2017, 02:51 PM
Last Post: sivaji
  Reading data from excel sheet serenediva 1 9,833 03-03-2017, 10:07 AM
Last Post: vinod123
  data table use uft_usr 1 2,343 06-29-2016, 05:23 PM
Last Post: Ankesh

Forum Jump:


Users browsing this thread: 1 Guest(s)