Page 1 of 1

Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Tue Apr 02, 2019 8:28 am
by udaybhasker
Objects are not identified while running the test. However, repository XPATH is in good and when we highlight the repository item, the focus is also good.

The object is identified in recording mode and the same object is not identified in test run mode.

Request your help!!!

Thanks in advance!!!!

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Tue Apr 02, 2019 9:31 am
by odklizec
Hi,

Please answer the following questions:
- Ranorex version?
- tested technology (WPF, Java, MFC,...)?
- full xpath of failing elements, as stored in repository (not just the last element)?
- please post a Ranorex snapshot (NOT screenshot) of failing element, ideally taken on failing computer.

If the test is running on different computer than you designed the tests on, there could be a problem with different Ranorex settings (if not stored in solution), different PC settings (different OS version, different runtime or .Net libs, etc...).

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Wed Apr 03, 2019 8:25 am
by udaybhasker
Hello,

Below are the point wise replies:

- Ranorex version?
Ranorex version: 9.0.0+git.2a79532e

- tested technology (WPF, Java, MFC,...)?
Technology: Java

- full xpath of failing elements, as stored in repository (not just the last element)?
Repository elements
_usernameInfo = new RepoItemInfo(this, "Username", ".//text[@accessiblename='Username:']", 30000, null, "91ef5c9f-ef6a-4ac8-a25e-bf19fb62f6be");
_passwordInfo = new RepoItemInfo(this, "Password", ".//text[@accessiblename='Password:']", 30000, null, "859da24e-bb16-4835-911b-b0066e388f6c");

- please post a Ranorex snapshot (NOT screenshot) of failing element, ideally taken on failing computer.
Ranorex snapshot attached

Ranorex is installed, recorded and running the test cases on same computer.

Thanks,
Uday

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Wed Apr 03, 2019 8:43 am
by odklizec
Hi,

Thanks for the details. One more thing, please post also exact error message you are getting.

BTW, the xpath you posted, shows only the xpath of given element, but not its parents! Please open the xpath in spy (in repository), and copy complete xpath, including parent elements!

My guess is, that any of the parent elements (stored in repo) has different xpath, than in runtime. For example, the xpath /form[@name='JBufferedFrame12'] stored in snapshot looks highly suspicious! Are you sure it's not a dynamically created name? Do you have the same name stored in repo? ;)

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Wed Apr 03, 2019 10:22 am
by udaybhasker
Hi,

I have edited in SPY and copied the complete xpath below :

/form[@title~'^Oracle\ Developer\ Forms\ Ru']/container[@type='ScrollBox']/container[@type='FormDesktopContainer']/container[@caption~'^RMS\ Logon\ \ \ \ \ \ \ \ \ \ \(logon']/?/?/container[@type='FScrollBox']//text[@accessiblename='Password:']

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Wed Apr 03, 2019 11:32 am
by odklizec
Hi,

I’m currently out of my PC, but have you tried this xpath in snapshot you published? Additionally, the xpath looks somewhat “fragile” with all these blank spaces, so I would suggest to eliminate all unnecessary spaces and check if the path is working with snapshot you posted. Then it should work in runtime too.

Re: Unable to identify Desktop application standard objects(like Button, Edit box)

Posted: Thu Apr 04, 2019 7:39 am
by udaybhasker
Hi,

i have tried with the above Xpath in snap shot which i have provided. It is identified and able to view the focussed password field box.