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:
Now you can write like:
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.
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.