Element not found when text field is non editable

Ranorex Spy, Recorder, and Studio.
TobyAuton
Posts: 1
Joined: Tue Apr 02, 2019 10:50 am

Element not found when text field is non editable

Post by TobyAuton » Tue Apr 02, 2019 11:06 am

I have a text field in a java applet that is sometimes greyed -out but I still need to read the value. An exception of element not found is thrown.
The attachment shot1.PNG is no longer available
The C# code is:

Ranorex.Text pageValue = Host.Local.FindSingle<Ranorex.Text>(path);
if (pageValue.TextValue.Equals(dataValue)) {//do work} //fails on above line

The exception is:
Ranorex.ElementNotFoundException: No element found for path '/dom[@domain~'consolidate']//iframe[@id='mctnt']//div[#'oRightPane']/iframe[@id='oRightPaneContent']//applet//text[@name='CONTACTS_ANSWERED']'

But I have verified the path using RanorexSpy and it is correct.
shot1.PNG
shot1.PNG (3.13 KiB) Viewed 42 times
Any help appreciated :)

User avatar
N612
Posts: 83
Joined: Mon Jul 11, 2016 4:01 pm

Re: Element not found when text field is non editable

Post by N612 » Tue Apr 02, 2019 8:22 pm

Hi Toby,

Are you able to provide a Ranorex Snapshot of this gray text element instead of a screenshot so we can better understand your application's structure and the available attributes? Thanks!