|
|
|
|
Regular Expression in Desc programming
|
|
03-03-2010, 08:28 AM
Post: #1
|
|||
|
|||
|
Regular Expression in Desc programming
I have to handle city names using regex This piece of code works for single word city names like Boston,Austin --working for single word city Browser("Hotels").Page("Hotels").Link("text:=Hotels in .*").Click If I have city names with 2 words or with . it blows up. Norfolk-Virginia Beach Tampa-St. Petersburg Bergen-Passaic Riverside-San Bernardino Orange county Please some one help me with this how to write for the above mentioned cities. Browser("Hotels").Page("Hotels").Link("text:=Hotels in .*").Click |
|||
|
10-05-2010, 11:29 AM
Post: #2
|
|||
|
|||
|
RE: Regular Expression in Desc programming
Above stmt should work, what was the error you are getting
Thanks Surya |
|||
|
10-06-2010, 03:57 AM
Post: #3
|
|||
|
|||
|
RE: Regular Expression in Desc programming
I'm guessing you are getting the "object's description matches more than one of the objects currently displayed in your application" error since you are not using more than one identification properties. Usually, you want to at least include "html tag", then if the text property of "text:=Hotels in .*" matches all of the "Hotels in" links on the page, you have to pick out which one you want to click with the "index" property. This will click the first "Hotels in" link:
Code: Browser("Hotels").Page("Hotels").Link("html tag:=A", "text:=Hotels in .*", "index:=0").Click-Christian Desserich |
|||
|
02-13-2011, 06:07 AM
Post: #4
|
|||
|
|||
|
RE: Regular Expression in Desc programming
In addition to the previous comment, try this:
Browser("title=.*").Page("title:=.*").Link("name:=xxxx", "index:=0").Click |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Regular expression for this string | falvi | 2 | 238 |
04-30-2012 11:14 AM Last Post: falvi |
|
| regular expression | rjkmr.aiht | 0 | 146 |
04-27-2012 11:37 AM Last Post: rjkmr.aiht |
|
| Regular Expression | samverma | 3 | 348 |
03-31-2012 01:21 AM Last Post: samverma |
|
| Square Bracket Issue - Regular Expression | kapsig431 | 2 | 281 |
03-29-2012 08:38 PM Last Post: kapsig431 |
|
| Regular Expression for time in 24 hour format with out colon | Pallavi | 3 | 431 |
03-13-2012 11:29 AM Last Post: sshukla12 |
|
User(s) browsing this thread: 1 Guest(s)
|
|

Search
Member List
Calendar
Help




