When we use RxSpy to snatch a object into repositry, the default rxpath is generated as below:
text[@caption~'^Do\ not\ power\ off\ during\ t']
Is the token '\ ' to represent a blank ? In standard regular expression ,we use '\s' to represent a blank.
Default generated rxpath VS regular expression
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Default generated rxpath VS regular expression
The regular expressions used in RanoreXPath are the standard .NET regular expressions. Usually, you do not need to escape white-spaces, however, the default behavior of the .NET Regex.Escape method (that is used internally) is to escape white-spaces anyway. So, in RxPaths with regular expressions you can use " " and "\ " for white-spaces.
"\s" matches not only white-spaces, but also tabs, new lines, form feeds, and so on. Please, consult the MSDN documentation for more information:
http://msdn.microsoft.com/en-us/library/4edbef7e.aspx
Regards,
Alex
Ranorex Support Team
"\s" matches not only white-spaces, but also tabs, new lines, form feeds, and so on. Please, consult the MSDN documentation for more information:
http://msdn.microsoft.com/en-us/library/4edbef7e.aspx
Regards,
Alex
Ranorex Support Team