| || |
I am doing regression testing in hotmail.com. When i record the web application, i see in Junk(6). I clicked on Junk(6). Then i run the script, it fails on Junk(6) step because Junk(6) became Junk in web application.
To solve it, i put regular expression statement(in object property) as follows: Junk\([0-100]\). it fails. If i have Junk(0) or Junk(1),.. it passes. but it fails because web application shows: Junk. No number next to it.
Someone pls help me. I have to do the same type of work in my job. I am just testing in hotmail first. Thanks.
Re: regular expression
The problem is that your regular expression is saying there will definitely be a number after the work 'Junk'
What you need is something like
? - Matches the preceding character zero or one time
* - Matches the preceding character zero or more times
So the above is, the word 'Junk' with possible nothing after it or '(' with any amount of numbers between 0 and 9 and ')'