Workaround for PopupWatcher causin LineageGlueRule exception

Ranorex Studio, Spy, Recorder, and Driver.
uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Workaround for PopupWatcher causin LineageGlueRule exception

Post by uhmdown » Fri Jul 07, 2017 1:14 pm

Hi,

Me and my colleague stumbled into an exception that was occuring when a PopupWatcher was being started up.

We got the LineageGlueRule exception variant that say Key not found.


After some intense debugging, we finally found out how to avoid it, so I'm sharing it here

Insert a delay after the code that starts up the PopupWatcher. It appears that the PopupWatcher needs some stability in the GUI while it is starting up, and any action that modifies or changes the SUT GUI risks disrupting whatever the PopupWatcher is doing while starting up.

May this save you from hours of debugging. :)
Last edited by uhmdown on Fri Jul 07, 2017 7:27 pm, edited 1 time in total.

Vega
Posts: 222
Joined: Tue Jan 17, 2023 7:50 pm

Re: Workaround for PopupWatcher causin LineageGlueRule exception

Post by Vega » Fri Jul 07, 2017 6:48 pm

Thanks for sharing! Might I ask how soon after you were starting your popup watcher instance did the actual popup dialog appear? How long of a delay did you use?

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Workaround for PopupWatcher causin LineageGlueRule exception

Post by uhmdown » Fri Jul 07, 2017 7:24 pm

The action that took place immediately after starting the PopupWatcher was opening a sidebar, which in turn would eventually cause a popup to appear after about 10 seconds.

At least in our case, the delay required was before opening the sidebar, not before the actual popup appearing. How soon the popup would appear was irrelevant; It was the GUI change caused by opening the sidebar that was messing with the watcher (or vice versa).

If the delay was omitted or too short, we got the LineageGlueRule exception and while the script could continue a bit, it would eventually go bonkers and produce unpredictable behaviour (failing to detect repo items, Ranorex freezing completely) at different spots in the script.

Vega
Posts: 222
Joined: Tue Jan 17, 2023 7:50 pm

Re: Workaround for PopupWatcher causin LineageGlueRule exception

Post by Vega » Tue Jul 11, 2017 8:24 pm

Very interesting! Thank you for the additional info