Repository objects no longer work after Win update

Ask general questions here.
MarkPropel
Posts: 3
Joined: Wed May 30, 2018 10:46 pm

Repository objects no longer work after Win update

Post by MarkPropel » Fri Jan 04, 2019 5:54 pm

Hi all,

We have a few program/element objects in our test repository. These were all working fine.

We recently upgraded many of our computers, including our test computers to Win 10 V1809. Since doing that upgrade none of the repository objects/elements work.

For example we have a very simple test that waits for a particular program object/TextArea to contain some text. Before the win update this worked fine. After the win update the program object/TextArea is never found.

I can of course edit the test, validate, point to the program, which creates a new repository object/TextArea and modify my tests to refer to that new object then they pass. But we have close to 30 tests and that would mean going through each one and resetting the objects.

First Question: Why did the objects change with this Windows update?

Next Question: Is there some way to force the respository to be updated to the new objects or if we must add new objects, globally go and change the references in all tests?

We are using Ranorex 8 and the target test apps are UWP, .NET apps.

Thanks in advance!

In looking in the repository the old object looked like this:

Code: Select all

		<appfolder
		addcaps="form,nativewindow"
		capname="text"
		id="96731a7a-0fe4-40a4-8a8d-7a3f24a7cf0f"
		isrooted="True"
		name="CPropelappsOurAppSimulatorPropelB"
		searchtimeout="5000ms"
		usecache="True">
			<item
			addcaps="titlebar,uiautomation"
			capname="titlebar"
			id="0c616e11-25bb-4431-bf2b-09db9c1bdc96"
			name="TitleBar"
			refimgid="240d1cd7-7b61-4c63-9398-0e059bb73b4e"
			searchtimeout="30000ms">
				/form[@title~'^Propel\.OurApp\.Simulator\.']/text[@automationid='Text Area']/titlebar[@automationid='TitleBar']
			</item>
			<item
			addcaps="text,uiautomation"
			capname="text"
			id="3eb352f4-b45b-4d58-80c9-83a8f7c4924f"
			name="TextArea"
			refimgid="15bec909-1a55-48a2-b221-f2d782a84b15"
			searchtimeout="30000ms">
				/form[@title~'^Propel\.OurApp\.Simulator\.']/text[@automationid='Text Area']/text[@automationid='Text Area']
			</item>
			<basepath>
				/form[@title~'^Propel\.OurApp\.Simulator\.']/text[@automationid='Text Area']
			</basepath>
			<icon>
				iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAFoSURBVDhPxZBJS0JRFMffqo/gFwj6FO0jmlAq
qShKkNBFi1w0EU1Pe/rITMyKHAmbSMoWRdO2jStX7mpnGxVxeING/+57pi2uBtaiAz/uPZd7fvee
w/x/2DjHRyL5ikTypWVIuYbZsDqEsixBlsQmSJDIWqN2LsgVRdBBBHZBSR6fEhT3D894r5QRj8fr
KMWd5hAtmOJiMPCXMO5EMe09h9l3qkpksfizYI3l1GTef4fF8C1mg1cw+Y9h8PlVQVkoUQLtHk8L
LIFrdLG76OHd6Hc71UtVQYESmG5maEH3pge9ThcGPFvQHdgxHLRWWxDoFhoK+lzb0Hp5DB5y0IdZ
jEVWms5AgRLo9h0YCtgwcrSO8ZNlTF4sqAKR/EAShe9CMpNcLkcL9CEWo5FVTJwtwRCdgzFmUQWS
kK8XK5RKRWQyGVrwlko1pFSoCkTycp7ss9kM0uk0LfgNqoBEG6H9K2kVDeEvwTCfPtZiAnZYmCwA
AAAASUVORK5CYII=
			</icon>
		</appfolder>
The new version found using spy looks like this:

Code: Select all

		<appfolder
		addcaps="form,nativewindow"
		capname="form"
		id="93085fe5-1585-4f0d-8610-bdabb7a601eb"
		isrooted="True"
		name="CPropelappsOurAppSimulatorPropelB1"
		refpath="/form[@title='C:\propelapps\ourapp\simulator\Propel.OurApp.Simulator.exe']"
		searchtimeout="5000ms"
		usecache="True">
			<item
			addcaps="text,uiautomation"
			capname="text"
			id="f8ef94d9-3d3f-4772-b564-f3dafebc2859"
			name="TextArea"
			refimgid="23a2deff-8695-4ab2-91cf-e5fb3141a149"
			refpath="/form[@title='C:\propelapps\ourapp\simulator\Propel.OurApp.Simulator.exe']/text[@automationid='Text Area']"
			searchtimeout="30000ms">
				/form[@title~'^C:\\propelapps\\ourapp\\sim']/text[@automationid='Text Area']
			</item>
			<basepath>
				/form[@title~'^C:\\propelapps\\ourapp\\sim']
			</basepath>
			<icon>
				iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAFoSURBVDhPxZBJS0JRFMffqo/gFwj6FO0jmlAq
qShKkNBFi1w0EU1Pe/rITMyKHAmbSMoWRdO2jStX7mpnGxVxeING/+57pi2uBtaiAz/uPZd7fvee
w/x/2DjHRyL5ikTypWVIuYbZsDqEsixBlsQmSJDIWqN2LsgVRdBBBHZBSR6fEhT3D894r5QRj8fr
KMWd5hAtmOJiMPCXMO5EMe09h9l3qkpksfizYI3l1GTef4fF8C1mg1cw+Y9h8PlVQVkoUQLtHk8L
LIFrdLG76OHd6Hc71UtVQYESmG5maEH3pge9ThcGPFvQHdgxHLRWWxDoFhoK+lzb0Hp5DB5y0IdZ
jEVWms5AgRLo9h0YCtgwcrSO8ZNlTF4sqAKR/EAShe9CMpNcLkcL9CEWo5FVTJwtwRCdgzFmUQWS
kK8XK5RKRWQyGVrwlko1pFSoCkTycp7ss9kM0uk0LfgNqoBEG6H9K2kVDeEvwTCfPtZiAnZYmCwA
AAAASUVORK5CYII=
			</icon>
		</appfolder>
The primary differences I note are:

1) The old object does not have a "refpath"
2) Path to searchable objects seems to have changed
Old: ^Propel\.OurApp\.Simulator\.
New: ^C:\\propelapps\\ourapp\\sim

Any ideas on why?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4981
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Repository objects no longer work after Win update

Post by odklizec » Tue Jan 08, 2019 9:01 am

Hi,

At first, could you please upload a Ranorex snapshot of the problematic element(s), ideally, taken on both windows versions? This would be very helpful. Thanks.

At next, what version of Ranorex exactly do you use? Ranorex 8 is just too vague, because there were many Ranorex 8 iterations released since Ranorex 8.0. Please use the most recent 8.3.2.

As of why things change after updating Windows, well, it's most probably a question for MS? ;) The thing is, that if Windows changes something internally, Ranorex needs to adapt to these changes. Another explanation might be, that you are using different Ranorex settings than before updating Windows? Have you did a clean install of windows and all apps after windows update or you simply performed an update over existing windows version and all apps stayed installed? Do you have Ranorex settings stored in solution?

From the xpaths you published, it looks as if the title is now displayed differently. This is most probably caused by an internal change in windows? I would suggest to either make the title more generic (use only strings equal on all windows versions) or even better, use some other identification attributes, like name or process name (or combination of multiple attributes). The Title attribute, if not properly constructed, could make the item unrecognizable on different windows and app (AUT) versions! The repo elements are only as good as are the xpaths created by the test automation developer. Recording often creates volatile xpaths, which is why you should ALWAYS review (and eventually and edit) them after each recording session!
Pavel Kudrys
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