Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How can we parameter a Web link within the QTP forums, part of the Software Testing category; 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 ...
|
|||||||
|
|||
|
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. |
| Sponsored Links |
|
|||
|
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......
__________________
Regards, V.Umesh Krishnan QA Consultant |
|
|||
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Clicking on corresponding add link | JobHelper | QTP | 2 | 06-19-2009 10:11 AM |
| Type of Parameter | Geek_Guest | C# | 1 | 11-20-2007 06:52 AM |
| Text link changes dynamically | idaretomess | QTP | 2 | 10-24-2007 09:59 AM |
| Link values to table | mapino | Data Warehousing | 0 | 10-16-2007 06:46 AM |
| how to link jsp pages | banjali | JSP | 3 | 06-15-2007 08:11 AM |