Browser("Yahoo! Mail: The best").Page("(2 unread) Yahoo! Mail").Link("Inbox (2)").Click
this is the recorded script i get after performing the action on yahoo mail..now when i run the test again ...the page title and link name changes as the no. of emails in inbox increases...so the error says cannot find the object.
can someone please tell me what regular expressions i should used for this script ?
Total Answers and Comments: 5
Last Update: January 23, 2009 Asked by: anushankar
Instead of "2 unread" you can regularise the option with a regular expression as [0-9]* in the palce of 2 and do not forget to check the regular expression check box.
Browser("Yahoo! Mail: The best").Page("(2 unread) Yahoo! Mail").Link("Inbox (2)").
we can resolve this issue by Regular Expresions. In the Object Repository change the Value of the object using .* and save the change in the Object Repository.
eg) Page("(2 unread) Yahoo! Mail") --> instead of this (2 unread) Yahoo! Mail) object change the object to a common name wih .*
this can be handled even using Descriptive Programming by give the Value of a unique property in the Code itself
Today I tried after read your question. You know what I did I just changed the object name in the object repository file.ie. when you are recording if is inbox(4) then running it must be inbox(3) in the application. so go to resource->object repository-> and change inbox(4) as inbox(3) in object name (inbox(4) will come when you expand object tree in repository file). then it is recognising the object and working fine. please let me know if it is wrong I am a beginner.