Hello,
I have a step where I have to enter an input and validate on the entered input
I have set this input as variable and added validation for the innertext to match the variable, however, the execution fails.
How to validate an input based on variable
How to validate an input based on variable
Last edited by mmahra on Thu Mar 19, 2020 11:15 am, edited 1 time in total.
Re: How to validate an input based on variable
Hi,
Apparently, the InnerText attribute of NewPropName element is empty. Could you please post a Ranorex snapshot (NOT screenshot) of the element, along with the xpath you are using for this element in repo?
My guess is that the InnerText of NewPropName is simply empty? Or the xpath of NewPropName returns more than one element and one of them has empty InnerText?
Apparently, the InnerText attribute of NewPropName element is empty. Could you please post a Ranorex snapshot (NOT screenshot) of the element, along with the xpath you are using for this element in repo?
My guess is that the InnerText of NewPropName is simply empty? Or the xpath of NewPropName returns more than one element and one of them has empty InnerText?
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
Re: How to validate an input based on variable
XPath: /dom[@domain='banzai-3001-0-0-432edda-3.jivelandia.com']//input[#'newPropName']
Last edited by mmahra on Thu Mar 19, 2020 11:14 am, edited 1 time in total.
Re: How to validate an input based on variable
Hi,
Thanks for the snapshot and xpath. As I've expected, the InnerText of given element is empty. So the validation is correct...
Thanks for the snapshot and xpath. As I've expected, the InnerText of given element is empty. So the validation is correct...
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
Re: How to validate an input based on variable
So How can I validate that the input field has the entered value in the key sequence?.
Actually validation are big challenge to me, everything passes when I just set it to "Exists" but it might fail in actual execution,however, Ranorex is execution success.
Actually validation are big challenge to me, everything passes when I just set it to "Exists" but it might fail in actual execution,however, Ranorex is execution success.
Re: How to validate an input based on variable
Hi,
Validation "Exists" validates the existence of pointed repo element, not its content. So if the element exists validation passes. If you want to validate the content of an element, you must validate a proper attribute, which contains the entered text.
Could you please create a snapshot of the problematic input element AFTER the input is filled with text? Ideally, add create snapshot action right after KeySequence action. Then simply check, in which property is store the entered text.
Validation "Exists" validates the existence of pointed repo element, not its content. So if the element exists validation passes. If you want to validate the content of an element, you must validate a proper attribute, which contains the entered text.
Could you please create a snapshot of the problematic input element AFTER the input is filled with text? Ideally, add create snapshot action right after KeySequence action. Then simply check, in which property is store the entered text.
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
Re: How to validate an input based on variable
Hi again,
It worked when Att. equal TagValue
Thats really awesome, Thank again and again
It worked when Att. equal TagValue
Thats really awesome, Thank again and again
Re: How to validate an input based on variable
Hi,
I'm glad it helped. This is why you always need to check the available attributes with Spy
I'm glad it helped. This is why you always need to check the available attributes with Spy

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