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 Code to click on 6 button within the QTP forums, part of the Software Testing category; Question asked by visitor If there are 10 buttons with same logical name and all properties are same, in different locations. now i want to write code to click on ...
|
|||||||
|
|||
|
Code to click on 6 button
Question asked by visitor
If there are 10 buttons with same logical name and all properties are same, in different locations. now i want to write code to click on 6 button . |
| Sponsored Links |
|
|||
|
Re: Code to click on 6 button
As of my understanding I suppose using Virtual buttons would help u out..Because it will recognise on the name given by us..
Correct me if im wrong!! |
|
|||
|
Re: Code to click on 6 button
Hi,
No need to use virtual objects. use descriptive programming. The code would be something like: Browser("Name").page("Name").Link("ClassName:=WebLink", "Name:=LogicalName", "index:=5").click This should work. Also, note that index starts with 0. |
| The Following 2 Users Say Thank You to smganesh For This Useful Post: | ||
|
|||
|
Re: Code to click on 6 button
Absolutely right..... Just that there is no need to give the property "ClassName".
Because, when you write "Browser("Name").page("Name").WebLink/WebButton" it is already identified as a Weblink or WebButton. So you can just write.... Browser("Name").Page("Name").WebButton("Name:=LogicalName", "index:=5").click |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Selecting Radio Button | JobHelper | QTP | 4 | 03-17-2009 10:49 AM |
| Validate Print button in webbased application | JobHelper | QTP | 3 | 07-15-2008 08:31 AM |
| Test cases for Push Button | Srikanth | Test Cases | 7 | 05-16-2007 07:32 AM |
| Menu found disappeared and Right click does not work | sagar007 | Geeks Lounge | 0 | 02-21-2007 04:29 AM |
| Browse Button Testcases | bharathi_ark | Test Cases | 1 | 12-16-2006 07:07 AM |