Chrome Access denied randomly with Ranorex 7.2

Ask general questions here.
EDR_CB
Posts: 17
Joined: Thu Mar 31, 2016 8:32 am

Chrome Access denied randomly with Ranorex 7.2

Post by EDR_CB » Mon Oct 23, 2017 8:47 am

Dear all,

i'm having some trouble with the Open Browser function using chrome with Ranorex 7.2.

My tests consist of a series of scenarios in which i Open Chrome, do some stuff and close chrome (to close i click on the browser then do an Alt+F4).

But sometimes, at random, I get an access denied when i try to open chrome.

Here is my code for opening :

Host.Local.OpenBrowser(URL, Browser, "--disable-web-security --user-data-dir=", false, false, true, true, false);

The weird part is, if i program the Ranorex Test to run a second time after failing, then suddenly the browser will open.

It's a real mystery because i happens à random.

Is there some special way i should close chrome to be ensure it will open again ?

Thank you in advance for your help.

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

Re: Chrome Access denied randomly with Ranorex 7.2

Post by odklizec » Mon Oct 23, 2017 9:03 am

Hi,

This is a known issue with OpenBrowser and Kill Existing option. It fires mainly in Chrome, saw it it IE too. The solution is to add a small delay (e.g. 5s) after closing browser and before opening new one. The solution is discussed here:
https://www.ranorex.com/forum/ranorex-h ... tml#p46121
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