Ranorex seeing a button that is not visible on a web page?

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Ranorex seeing a button that is not visible on a web page?

Post by Fergal » Tue Jul 15, 2014 10:02 am

[Internet Explorer 10, Windows 7, Ranorex 5.0.3]

I have a test step to verify that a button does NOT exist within a dialog box in a web application. The repository item for the button is identified as an "innertext" WebElement.

The button does not appear on the web page, when the test step is run, yet the test fails - i.e. Ranorex is reporting that the button does exist. When I select highlight for the button element in the repository, nothing in the web page is highlighted.

What are the possible reasons why Ranorex could be seeing a button on a web page that doesn't exist?

Thanks!

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex seeing a button that is not visible on a web page?

Post by krstcs » Tue Jul 15, 2014 1:39 pm

With most web pages, the controls are all loaded at once, even if they are not being used right then. It is more efficient to pull all the HTML/Javascript down at the same time. But this means that the elements will exist, even if they aren't visible.

In your case, I would suggest using the "Visible" property of the element instead of "Exists".
Shortcuts usually aren't...

Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Re: Ranorex seeing a button that is not visible on a web page?

Post by Tnimni » Tue Jul 15, 2014 3:36 pm

Fergal wrote:[Internet Explorer 10, Windows 7, Ranorex 5.0.3]

I have a test step to verify that a button does NOT exist within a dialog box in a web application. The repository item for the button is identified as an "innertext" WebElement.

The button does not appear on the web page, when the test step is run, yet the test fails - i.e. Ranorex is reporting that the button does exist. When I select highlight for the button element in the repository, nothing in the web page is highlighted.

What are the possible reasons why Ranorex could be seeing a button on a web page that doesn't exist?

Thanks!
Could you provide the HTML code for the button and/or the css related?

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Ranorex seeing a button that is not visible on a web page?

Post by Fergal » Tue Jul 15, 2014 4:35 pm

krstcs wrote:...suggest using the "Visible" property of the element instead of "Exists".
Thanks very much krstcs, I changed that setting in the "General" area of the repository for the relevant buttons and the test is now working perfectly.

Tnimni wrote:Could you provide the HTML code for the button and/or the css related?
Thanks for your reply Tnimni, thankfully I have it working now.