Ranorex path with regular expression problem

Ask general questions here.
lingzhou
Posts: 21
Joined: Fri Jul 10, 2009 7:49 pm

Ranorex path with regular expression problem

Post by lingzhou » Wed Sep 09, 2009 3:39 pm

I have a scrollbar object in my project repository, the path is
"list/scrollbar[@type='ScrollBar' and @fulltype='fl.controls::ScrollBar' and @maxvalue='5300']/button[3]"

almost every build, the maxvalue changes. Is there anyway that I can put a wildcard character on this object so I don't have to change it everytime before I run it? I have tried those but all failed

"list/scrollbar[@type='ScrollBar' and @fulltype='fl.controls::ScrollBar' and @maxvalue='*']/button[3]"

"list/*/button[3]"

"list/scrollbar[@type='ScrollBar' and @fulltype='fl.controls::ScrollBar']/button[3]"

Can anyone give me suggestions on how to use regular expression here?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex path with regular expression problem

Post by Support Team » Wed Sep 09, 2009 6:28 pm

Wildcards are not regular expressions! That means "*" is not a regular expressions for "match everything".

Please read the regular expression documentation in the Ranorex User Guide and/or on MSDN:
http://www.ranorex.com/support/user-gui ... html#c2463
http://msdn.microsoft.com/en-us/library/az24scfc.aspx

I believe you meant ".*" which matches any character zero or more time (= "match everything").

Regards,
Alex
Ranorex Support Team
.
Image

lingzhou
Posts: 21
Joined: Fri Jul 10, 2009 7:49 pm

Re: Ranorex path with regular expression problem

Post by lingzhou » Wed Sep 09, 2009 10:09 pm

thanks for the help, Alex.