Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to update code/data at run time
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi I'm recording & running on yahoo site mail inbox.Code is below

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Documents and Settings","open"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "http://www.yahoomail.com/"
Browser("Browser").Page("Yahoo! Mail: The best").WebEdit("login").Set "user"
Browser("Browser").Page("Yahoo! Mail: The best").WebEdit("passwd").Set "Mercury"
Browser("Browser").Page("Yahoo! Mail: The best").WebButton("Sign In").Click
[b][color=#FF0000]Browser("Browser").Page("Yahoo! Mail - user@yahoo").Link("Inbox(4)").Click[/color][/b]
Browser("Browser").Page("Yahoo! Mail - user@yahoo_2").Link("tutorials site").Click
Browser("Browser").Page("Yahoo! Mail - user@yahoo_3").WebButton("Compose").Click

The question is when i signed in, my inbox had 4 mail.I checked and composed mail and logged out.Now again i runned my application but this time number of mails in Inbox has changed because of that my test failed.What should i do.

Thanks in Advance,
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Use Regular Expression. Go to object repository, choose the object properties for Link object. Change Inbox(4) to Inbox(.*) and check the option for Regular Expression. A pop up will be displayed, select No.

Your test should run fine now.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks Ankur, My code worked fine..I've changed the text property as Inbox(.*) as a reular expression and name to Inbox(.*) and It worked.


Forum Jump:


Users browsing this thread: 1 Guest(s)