QTP Testing Scenario

Can anyone please solve this Scenario?
"1)Enter Used ID
2)Enter Password
3)A screen will be opened, in that screen there are n number of check boxes, we have to click on 1st check box and then we have to log out. The same process should be followed and should click on 2 check box when we login second time, like this the process should go. How can we automate this scenario?

Showing Answers 1 - 2 of 2 Answers

Kalyan

  • Oct 23rd, 2007
 

Add all the objects into the repository. The logical name of the object will go in a sequence. Use the for loop for executing it.

(or) you can go for descriptive programming. See the below example and check whether it is helpful or not.

Eg:
a = Objects count.
For i =1 to a
Systemutil.Run
[website]
Browser("Admin Menu").Page("Admin Menu").WebElement("Admin Menu" &"_"& i).Click
Browser("Admin Menu").Webbutton("Logoff").Click
Next

Please let me know if this is not sufficient.

  Was this answer useful?  Yes

bnbabu

  • Feb 20th, 2009
 

a = Objects count.
For i =1 to a
Systemutil.Run "Mercury .com","iexplore"
[website]

Browser("Mercury Tours").Page("Find Flights").WebCheckBox("roundtrip"&-"&i).click
Browser("Mercury Tours").Webbutton("Logoff").Click
Next

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions