Page 1 of 1

Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 10:32 am
by andy.simpson
I'm using Ranorex version 9.1.2 and have an issue dealing with a popup in chrome, my AUT will prompt you if your password will need updating in a set number of days with a popup. You cannot spy this popup at all using the separate spy tool, in fact while this popup is present it appears to lock you out of the whole browser window. The only way you can locate the popup objects is using spy within Ranorex itself which works fine and locates the objects very fast when highlighting them in the repository but when the test is run it simply cant find it, Here are the things that I have tried so far

Invoking Focus/Ensure visable on the item and its parent folders
disabling the cache on the repository items parent folder
Wait for exists
Hard delay

I've attached a screenshot of the fail and a snapshot of the object in spy, any advice id be grateful

Re: Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 10:43 am
by odklizec
Hi,

Have you tried to add Chrome process name to Ranorex Whitelist?

Also, the reason, why standalone Spy does not work (while the integrated one does) is, that the standalone Spy most probably uses different settings. Try to export settings from integrated Spy and load them in standalone Spy.

Re: Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 1:23 pm
by andy.simpson
Ahh sorry yes didn't mention that chrome has been added to the whitelist, I did wonder whether the popup itself was a different item on the whitelist but couldn't see it as a separate entity in task manager.

I tried copying the settings over and running as administrator but this doesn't seem to help, in spy when you select tracking all the elements grey out instantly

Re: Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 1:24 pm
by andy.simpson
Ahh sorry yes didn't mention that chrome has been added to the whitelist, I did wonder whether the popup itself was a different item on the whitelist but couldn't see it as a separate entity in task manager.

I tried copying the settings over and running as administrator but this doesn't seem to help, in spy when you select tracking all the elements grey out instantly

Re: Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 3:03 pm
by odklizec
Hi,

Try to create a repo element, located out of "Documation" form and with xpath like this...

Code: Select all

/?/form[@title='tst-thor says']//button[@text='OK']

Re: Issue dealing with chrome popup

Posted: Tue Nov 26, 2019 3:55 pm
by andy.simpson
That works thanks :D I have removed the first two forms from the xpath and just search on the popup box the the OK button, running that in the test

I have attempted to incorporate that into a popup watcher, but when the same repo items are used the report shows that the popup watcher is instantiated it find the popup and the button but doesn't click the button :/ I've attached a picture of the test report

Re: Issue dealing with chrome popup

Posted: Wed Nov 27, 2019 7:16 am
by odklizec
Hi,

Please show the entire error. It seems that it actually fails to find the OK button? What xpath does the repo item have? Ideally, please post also the screenshot of the repository, where we can see the structure of both repo items. Thanks.

Re: Issue dealing with chrome popup

Posted: Wed Nov 27, 2019 9:13 am
by andy.simpson
Ahh sorry I excluded the failure as it appears to occur on the next module rather than the popup watcher, Iv attached them for clarity

Could it be a timeout issue? as the base form has been removed it does take longer to spy the object

Re: Issue dealing with chrome popup

Posted: Wed Nov 27, 2019 10:14 am
by odklizec
Ah sorry, I just thought that the error is coming from popupwatcher. Well, in this case, I don't have a clue why the button was not clicked. I would suggest to change the repo structure, like this:
ChromePopUpBox.png

Re: Issue dealing with chrome popup

Posted: Wed Nov 27, 2019 11:10 am
by andy.simpson
OK that still seems to be an issue, I'll ref it to Ranorex support and let you know how I get on

Thanks v much for your advice