How can we parameter a Web link
How can we parameterize the link? The scanarios is as follows:
1) Clink on a link and enter the page
2) there will be table which contains the fields like "UsedID,Address,ZIP"
3) Close the page
How can we automate this scenario?
Thanks in advance.
Re: How can we parameter a Web link
Can anyone please solve the above Scenario
Re: How can we parameter a Web link
hai iliaz...is that the link in a table..if its in a table then u can use the getcelldata...and click on the link...becoz the link will always appear in a particular cell...
Re: How can we parameter a Web link
Hi Iliaz,
can you please explain as to why you are looking at parameterizing the Link.
Coz I guess the Link name is going to remain the same for every iteration.
Incase you are talking of different links existing and clicking on each would lead to page with a Table displaying some fields, I guess it makes sense to parameterize the link click action.
NOTE : Only incase all the specified links occur in the same page, would you make sense to parameterize.
Include all Link Object names into your Local or Global Datasheet. The remaining operation prior to clicking and after clicking the link will remain the same.
The syntax would be - Browser("").Page("").Link(DataTable("ColumnName",dtLocalSheet)
You could also add checkpoints or simply use getCellData to validate the fields displayed in the webpages resulting from clicking on the links.
Let me know if this is what you are looking at.
cheers......
Re: How can we parameter a Web link
'Assume that the names of WebLinks present in the page are stored in 'LnkName' unser LocalSheet
'As we can identify the Weblink Using its 'name' property
set Lnk = Description.Create
Lnk("micClass").Value = "Link"
rcnt = DataTable.GetRowCount
For i = 1 to rcnt
DataTable.setCurrentRow(i)
Lnk("name").Value = DataTable("lnkName",dtLocalSheet)
Lnk.Click
'Copy The values in Table and store in dataTable
'Close the Window
Next
Re: How can we parameter a Web link
Hi,
I need some information about passing the dynamic value in to weblink.
Mine is a web application. The script what i have is like this:
'Browser("Login").Page("Application").Frame("ScopeFrame").Link("DC4303788(Active)").Click
In which the data DC4303788" in Link method will get changed dynamically. I am able to get the value "DC4303788" in to a variable using getROproperty method. Now, instead of placing the value DC4303788 in to link method, i want to pass the variable where the value DC4303788 which i have.
Is it possible to pass any dynamic value into link method?
Pls help me out in this.
Re: How can we parameter a Web link
Hai friend,
Just try this
Method 1
dynamic1=Browser("Login").Page("Application").Frame("ScopeFrame").Link("html tag:=A").GetRoProperty("innertext")
Browser("Login").Page("Application").Frame("ScopeFrame").Link(dynamic1).Click
Method 2
Use regular expression.
Here I assume all link name is starting with DC so I am adding regular expression given below
Browser("Login").Page("Application").Frame("ScopeFrame").Link("DC.*").
Let me know if any issues exists
Thanks
Deepa
Re: How can we parameter a Web link
Deepa,
I have similar dynamic link issue where the name of the link changes.i tried both the ways u said but none of them worked for me . when i used the first method
dynamic1=Browser("Browser").Page("TREX_5").Frame("Frame_2").
Link("html tag:=A").GetRoProperty("text")
Browser("Browser").Page("TREX_5").Frame("Frame_2").Link(dynamic1).Click
I see an error General Run time error (2147220989)
when i tried the second method i get this error
The "COPY.*" Link object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.
Can you please let me know how to fix the error.Thank you
Lakshmi