I use Ranorex Spy to view applications , my application's path is
Base:/form[@title~'xxxx\AAAA\and\BBBB']
In regular expression ,to represent a blank space , by \s or \S.
Single char \ means changing its meaning.
I don't know what dows \ mean in Ranorex path here?
Are there some diffriences between standard regular expression and Ranorex regular expression?
BTW all attributes represented in path are in Ranorex Spy, right?
What does the regular expression mean?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Ranorex uses the standard .NET Regular Expressions (see MSDN documentation of the Regex class). There are characters like the backslash that (standing alone or in combination) have a special meaning in a regular expression (please have a look on the regular expression language elements), like you stated the "\s" denotes a white-space character.
"\A" or "\B" do not have a special meaning; the paths generated by the Ranorex Recorder or Spy should not contain backslashes unless used for escaping the backslash itself or in front of a space "\ " (this is usually not needed, but the Regex.Escape method escapes white spaces anyway). So, if the path below is really generated by one of the Ranorex tools, please submit a bug report containing the exact Ranorex version!
Regards,
Alex
Ranorex Support Team
"\A" or "\B" do not have a special meaning; the paths generated by the Ranorex Recorder or Spy should not contain backslashes unless used for escaping the backslash itself or in front of a space "\ " (this is usually not needed, but the Regex.Escape method escapes white spaces anyway). So, if the path below is really generated by one of the Ranorex tools, please submit a bug report containing the exact Ranorex version!
Yes, you can use all the attributes you see in the General tab of RanorexSpy in RanoreXPaths.marcushe wrote:BTW all attributes represented in path are in Ranorex Spy
Regards,
Alex
Ranorex Support Team
Thanks and other problem
My working Environment: Win7 , Ranorex2.02
There are some problem to modify rxpath on rxrepositry.
Assume default captured path is:
Base:/form[@title='My and Application' and @class='#32770' ]
I want to fix it as
Base:/form[@title~'*My and Application' and @class='#32770' and @enabled='True']
1.
when i deleted = and add ~'* ,then return
it doesn't change!!
Then i changed it as
Base:/form[@title~' *My and Application' and @class='#32770']
2.
When i add @enabled='True' to it and execute script ,this form can't be recognized.
if i add @enabled=True and return , word 'True' will miss
There are some problem to modify rxpath on rxrepositry.
Assume default captured path is:
Base:/form[@title='My and Application' and @class='#32770' ]
I want to fix it as
Base:/form[@title~'*My and Application' and @class='#32770' and @enabled='True']
1.
when i deleted = and add ~'* ,then return
it doesn't change!!
Then i changed it as
Base:/form[@title~' *My and Application' and @class='#32770']
2.
When i add @enabled='True' to it and execute script ,this form can't be recognized.
if i add @enabled=True and return , word 'True' will miss
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
ad 1) Please note that '*My and Application' is not a valid regular expression! Do not confuse regular expressions with wildcards; '*' is a quantifier in regular expressions and matches the preceding element zero or more times. Please, read the MSDN documentation of regular expressions:
http://msdn.microsoft.com/en-us/library/az24scfc.aspx
ad 2) "@enabled='true'" should work, so please just use a small first letter.
Regards,
Alex
Ranorex Support Team
http://msdn.microsoft.com/en-us/library/az24scfc.aspx
ad 2) "@enabled='true'" should work, so please just use a small first letter.
Regards,
Alex
Ranorex Support Team