Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with If - Then statement
#1
Solved: 10 Years, 10 Months ago
My company has just introduced the QTP and we have been asked to start working on it. I have no prior experience with it.

as an exercise, i started testing the yahoo mail. Those of you who have used yahoo, know that Yahoo lets you sign into the messenger chat by clicking on the offline link (on top of the page in yahoo inbox) and then lets u chose the options like available, or sign in as invisible etc. I am trying to write a statement which checks that if the value for that web element is "offline", then it should click on offline and then click on the available link. i have written the following code but it doesnt seem to work. Your help is much appreciated.
Code:
If Browser("Yahoo! Mail: The best").Page("(9 unread) Yahoo! Mail,_3").WebElement("Offline") Then
Browser("Yahoo! Mail: The best").Page("(9 unread) Yahoo! Mail,_3").WebElement("Offline").Click
Browser("Yahoo! Mail: The best").Page("(9 unread) Yahoo! Mail,_2").WebElement("Available").Click
End If
Reply


Messages In This Thread
Help with If - Then statement - by pipsonian - 05-19-2009, 10:37 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)