I am having a hard time implementing a regular expression for some objects I am mapping. I have read through the documentation and am still unable to resolve the issue.
Object Path:
body/form/div[@id='ctl00_divContent']/div[@id='ctl00_divBody']/div/div[@id='pagewrap']/div[4]/div[@id='col1']/div[@id='gHotLoads_portlet']
The 'col1' could be col 1, 2, or 3. So I have attempted to change the 1 to .* or [1-3] with no success.
New Path:
body/form/div[@id='ctl00_divContent']/div[@id='ctl00_divBody']/div/div[@id='pagewrap']/div[4]/div[@id='col.*']/div[@id='gHotLoads_portlet']
After implementing the new path Ranorex cannot highlight the element on the screen.
Any ideas?
Thanks!
Path with Reg Expression Issues
Re: Path with Reg Expression Issues
I was able to use a wildcard in this fashion:
body/form/div[@id='ctl00_divContent']/div[@id='ctl00_divBody']/div/div[@id='pagewrap']/div[4]/*/div[@id='gHotLoads_portlet']
This worked - still wondering about the regular expression issue though.
Thanks!
body/form/div[@id='ctl00_divContent']/div[@id='ctl00_divBody']/div/div[@id='pagewrap']/div[4]/*/div[@id='gHotLoads_portlet']
This worked - still wondering about the regular expression issue though.
Thanks!
Re: Path with Reg Expression Issues
You need to change the = to a ~ to use regex mode....
Alternatively you could do @id='1' or @id='2'
Alternatively you could do @id='1' or @id='2'
Re: Path with Reg Expression Issues
That worked, thanks!