Validation: Match the value of regular expression
-
- Posts: 68
- Joined: Wed Jun 29, 2016 1:19 pm
- Location: Frankfurt, Germany
- Contact:
Validation: Match the value of regular expression
Whenever I set the validation point and have my Regex inside of my pre-defined repo element (for example on AccessibleName property), Ranorex doesn't update the match value and the validation will fail in the end. Am I doing something wrong or this is more of a "user-voice issue"? Thanks
Ranorex Explorer @DVAG
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Re: Validation: Match the value of regular expression
Hey
Could you please give more information regarding your issue.
Code sample, repo element and a snapshot (not a screenshot) of the problematic item would be great.
Martin
Could you please give more information regarding your issue.
Code sample, repo element and a snapshot (not a screenshot) of the problematic item would be great.
Martin
Re: Validation: Match the value of regular expression
Agree with Martin, please post some more details, like the exact xpath you are using in repo, including the regex you are using. Also an example of valid AccessibleName (which currently fails) would be great. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 68
- Joined: Wed Jun 29, 2016 1:19 pm
- Location: Frankfurt, Germany
- Contact:
Re: Validation: Match the value of regular expression
Unfortunately I cannot send you a snapshot...
But What I can do is:
- Adapter: Text
- Attribute: AccessibleName "ABHMB.[a-zA-Z]"
- And I wanna make Validation against this adapter with provided attribute... But when I do this, the default captured value is selected (ABHMB.Abmeldung.020102) as the "match value" in my recording module and when I type in the same thing as in the AccessibleName property is, my validation fails.
Hope this helps both of you...
But What I can do is:
- Adapter: Text
- Attribute: AccessibleName "ABHMB.[a-zA-Z]"
- And I wanna make Validation against this adapter with provided attribute... But when I do this, the default captured value is selected (ABHMB.Abmeldung.020102) as the "match value" in my recording module and when I type in the same thing as in the AccessibleName property is, my validation fails.
Hope this helps both of you...
Ranorex Explorer @DVAG
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Re: Validation: Match the value of regular expression
If I understand your problem right, you want to validate the AccessibleName by string starting with "ABHMB." and the rest of string is not important to you? So I would suggest to use regex like this:
or
Code: Select all
^ABHMB\.
Code: Select all
^ABHMB\.(.*)
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 68
- Joined: Wed Jun 29, 2016 1:19 pm
- Location: Frankfurt, Germany
- Contact:
Re: Validation: Match the value of regular expression
Well ultimately... I'm having issues with Validation method, not with the syntax of regular expression. Long story short - you can't use Regex inside of "match value" field
You do not have the required permissions to view the files attached to this post.
Ranorex Explorer @DVAG
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0
Re: Validation: Match the value of regular expression
You just need to use AttributeRegEx instead of AttributeEqual. The only downside is, that AttributeRegEx currently does not support mixing variables with regexes. So if you want to use regex with variable, you need to convert the action to user code and combine regex with variable in code (as discussed for example here).
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration