Handling browser alerts

Best practices, code snippets for common functionality, examples, and guidelines.
theraviz
Posts: 110
Joined: Sun Apr 14, 2019 9:46 am

Handling browser alerts

Post by theraviz » Tue Aug 30, 2022 8:21 am

Hello,

I am facing issue with EDGE browser alert. The browser alert dialogue box is hidden nut I have managed to add the button control from forms. But during execution click is not being performed on the button and the test fails. At the same time I’m able to spy the button without failure.

Please help
image001.png
You do not have the required permissions to view the files attached to this post.

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

Re: Handling browser alerts

Post by odklizec » Tue Aug 30, 2022 9:58 am

Hi,

To be able to identify browser controls, you need to enable accessibility. Check my post here:
https://www.ranorex.info/solve-confirm- ... tml#p60098
Unfortunately, tracking may still not work with these controls, but you should be able to find and use them via Spy tree. Hope this helps?
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

theraviz
Posts: 110
Joined: Sun Apr 14, 2019 9:46 am

Re: Handling browser alerts

Post by theraviz » Wed Aug 31, 2022 9:07 am

Hi,

To be able to identify browser controls, you need to enable accessibility. Check my post here:
https://www.ranorex.info/solve-confirm- ... tml#p60098
Unfortunately, tracking may still not work with these controls, but you should be able to find and use them via Spy tree. Hope this helps?
[/quote]

Hello Pavel,

Thanks for your reply. I tried your work around but I am getting the error as shown in the screenshot.

I have added the User Code you mentioned in the forum to launch the application.
OK button is till be abled to identify using spy without any issues.
But during execution it fails to perform click and throws the "whitelist" error even though msedge is added in the whitelist. Please cross check the screenshot.
And i have re performed instrumentation also.

One thing which i noticed is the ranorex plugin which i have mentioned as "Chrome" is that the issue? If there is any particular plugin for Edge could you please provide the url or guide?
image003.png
image005.png
You do not have the required permissions to view the files attached to this post.

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

Re: Handling browser alerts

Post by odklizec » Wed Sep 07, 2022 11:03 am

Hi,

Well, adding --args --force-renderer-accessibility as Chrome launch parameter usually worked for me. If it still does not work for you, then I'm afraid, I'm out of ideas here. Make sure the Chrome is really started with these parameters and what's also important, make sure Chrome is not running in background! If it still fails, then try to ask Ranorex support for help. I'm afraid, there is nothing anyone here can do or suggest, without seeing the app under test and your Ranorex solution.
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

theraviz
Posts: 110
Joined: Sun Apr 14, 2019 9:46 am

Re: Handling browser alerts

Post by theraviz » Wed Sep 07, 2022 1:12 pm

Hi Pavel,

Thanks for the reply. My browser is not chrome, it is EDGE. Thats why I am having this trouble.