Ranorex fails to obtain value from HTML <input> field

Best practices, code snippets for common functionality, examples, and guidelines.
Gzmot
Posts: 1
Joined: Wed Jul 31, 2019 10:15 am

Ranorex fails to obtain value from HTML <input> field

Post by Gzmot » Wed Jul 31, 2019 10:39 am

My website is very simple calculator. My test goes as follows:

Mouse Click Left Relative ButtonTag9
Mouse Click Left Relative ButtonTagPlus
Mouse Click Left Relative ButtonTag9
Mouse Click Left Relative ButtonEq
Get value Value $calcInput Relative equationInputField
Validate AttributeEqual $calcInput 18 equationInputField

(the user can type instead of using the buttons, so that is why the output is shown in the equationInputField)
The calculator works when I manually test it, however it appears that Ranorex thinks that $calcInput='(null)'
Despite calcInput holding the correct value.
I beleive I have made a mistake on the Get value aspect of the test.

Site Screenshots:
https://imgur.com/a/1xNR0vL

Any help appreciated :D

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex fails to obtain value from HTML <input> field

Post by Support Team » Thu Aug 01, 2019 11:23 pm

Hi Gzmot,

Be sure you are getting the right attribute value for the element. In Ranorex Spy, after selecting an element on the left, you can see all of the available attributes and their current values on the right .
1.png

The get-value action should be like below. If you are only needing to validate this data, you should use a validation action (also in the image below).
2.png

If you continue to experience issues, please provide a Ranorex Snapshot (not screenshot) of this application under test and a copy of your solution (compressed).

I hope this helps!

Cheers,
Ned
You do not have the required permissions to view the files attached to this post.