Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with regular expression (i guess...)

Status
Not open for further replies.

PyroBen

Programmer
Aug 16, 2007
2
FR
Hi,

I have to pick up a text inside a WebElement. When i add the WebElement to my repository, the property "innertext" contain the text that i want.

The text is : "Evenement n° du sinistre n° 2007/00455".
The numbers at the end of the text change all the time so when i run my program, QTP cannot find the object.

I tryed to use several regular expression for the property innertext like : Evenement n° du sinistre n° \* OR * OR .* ...
I tryed a lot of them but when i try to highlight the object, QTP never find it.

Do i use not in the good way the regular expression? What else i have to do?

Thanks a lot for your answers.

Ben.
 
Try using "!Evenement n° du sinistre n°.*" as your regular expression.

That should work.

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
Thanks it works.

The problem was when the software want to add "\". We have to answer NO.

Thanks again.

Ben.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top