2gis / Winium

Automation framework for Windows platforms
Mozilla Public License 2.0
384 stars 123 forks source link

Automation for "Chrome Legacy Window" using winium #102

Open idan356 opened 5 years ago

idan356 commented 5 years ago

Hi, I'm trying to automate GUI tests for a windows app that has some WPF windows and some "Chrome Legacy Window" windows. I'm using "Automation Spy" for inspecting UI element's ids in WPF windows, but when I'm trying to inspect elements in "Chrome Legacy Window" I can't find any. ("Automation Spy" can't inspect such windows, and any other alternative I have found) I found some topics online with same question but with no answers. Is there any way to automate GUI tests with "Chrome Legacy Window" windows using winium? Thank you.

savtambe commented 5 years ago

Hi Team,

We are also facing similar issue with chromium embedded forms, could you please let us know how to spy elements of the chromium embedded forms.

Thanks in advance.

idan356 commented 5 years ago

Yes :) you can find the soultion I found here: https://stackoverflow.com/questions/57890068/automation-for-chrome-legacy-window-chromium-using-winium

lihtnes1990 commented 4 years ago

Hi,

I am trying the same scenario what is explained in issue description and tried solution which mentioned in the link (https://stackoverflow.com/questions/57890068/automation-for-chrome-legacy-window-chromium-using-winium). I can accessed by my WPF window using Winium control and tried to control CEF window using ChromeDriver options. (Already added debuggingport with my CEF settings). But when i try to access web elements from CEF window, my CEF client opened and closed and also getting below error:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 81 Build info: version: '3.141.59', revision: 'e82be7d358', time: ""

I have checked my chromedriver and CEF client version compatiblity. Chromium client - 81.0.4040.113 ChromeDriver - 81.0.4040.138

Is there any to way resolve this issue.

Thanks in Advance.

idan356 commented 4 years ago

Hi, altough you already checked the version compatibility, please check again: Navigate to: chrome://settings/help from your browser, and find your version (e.g 81.0.4044.138). Then download (again) the right ChromeDriver from: https://chromedriver.chromium.org/downloads

The only thing I can think of is that you're using the wrong ChromeDriver executable in your code. Make sure you're using the one you just downloaded.

lihtnes1990 commented 4 years ago

Hi,

Yes you are correct. My window control is build with some older version of CEF framework as like v79.0. That is what i getting that issue. So i have downgraded my chromedriver and CEF client version equvalent to my client window control. Now i can able to access web control through remote debugging. Thank you so much.

lihtnes1990 commented 4 years ago

Hi,

Having another question. While starting the chrome driver, CEF client is opened along with my WPF window and doing the automation using remote debugging mode. Is there anyway to hide CEF client initialization? . I have tried headless and disable-gpu option with chrome options. but no luck.

Thanks in advance.