Ranorex is not stable after enabling --disable-web-security

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
skieur
Posts: 8
Joined: Mon Mar 06, 2017 11:20 am

Ranorex is not stable after enabling --disable-web-security

Post by skieur » Sat Mar 11, 2017 2:00 pm

Hi expert,

We are using Ranorex (version 6.2.1) for automation test on Chrome.

Operating system: win10
Ranorex version: 6.2.1
Browser: chrome Version 56.0.2924.87

Due to we have introduced iframe tag into our login page, to make Ranorex can identify UI elements in iframe tag, we have used –disable-web-security variable to open chrome. However, it looks like now our test suite is not stable any more after introducing this flag. For example:

(1) Test case 1: open browser, login in, execute test steps, close browser; pass

(2) Test case 2: open browser, login in, execute test steps, close browser; pass

(3) Test case 3: open browser, login in, execute test steps, close browser; pass

(4) Test case 4: open browser, login in, execute test steps, close browser; fail (cannot identify UI elements in login page)

(5) Test case 5: open browser, login in, execute test steps, close browser; fail (cannot identify UI elements in login page)

(6) Test case 6: open browser, login in, execute test steps, close browser; fail (cannot identify UI elements in login page)

This is strange. Coz all our cases have the same login in module and close browser module except the steps for business logic. Some cases randomly met the old issue that UI elements cannot be found in iframe. If we manually run the case one by one, they all works correctly individually.

This is how we open browser: Host.Local.OpenBrowser(AgentHomeURL, "Chrome", ChromeUserData, true, true, true, false, true);
ChromeUserData: --disable-web-security --user-data-dir="C:\Users\d044880\AppData\Local\Google\Chrome\User Data\Default"
How we close browser: Host.Local.KillApplication(repo.ForCloseChromeBrowser.Self);

Does anyone have any solution for this issue? Could you give us some solutions on how to make the test case stable after introducing –disable-web-security flag..

Thanks in advance.

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

Re: Ranorex is not stable after enabling --disable-web-security

Post by odklizec » Mon Mar 13, 2017 8:50 am

Hi,

I'm afraid, without seeing the exact error message, failing xpath and also the snapshot of given login screen, it's nearly impossible to tell what's wrong. I would suggest to add an action before failing step, that would save the Ranorex snapshot of actual login screen. So then you can check in what state the login screen actually was before the fail.
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