Using ChromeDriver/Selenium to test Chromium-Embedded Browsers...

322 views
Skip to first unread message

matt....@gmail.com

unread,
Sep 23, 2013, 12:23:34 PM9/23/13
to chromedri...@googlegroups.com
Hi,

I am working on a project right now which requires automated GUI tests. It's a CEF based product, and we have settled on Selenium to smoke test it.

We are quite a way into the project and have a large number of selenium tests, when we started we saw that it wasn't possible to use the Selenium/ChromeDriver to automate CEF. As a compromise we used Chrome and hoped the results wouldn't be too far off the mark. Since Google forked Webkit and rebranded it to "Blink" and a few Monday mornings with lots of broken tests because of Chromes auto update we are planning on testing CEF directly.

I've recently been tasked with bridging the above gap. Our setup is:

Tests written in Java
CEF: 1453 paired with Chromium source 27.0.1453.73
ChromeDriver: 2.3
Selenium: 2.31.0

According to this Bug report:

"Issue 549 - CEF3: Add WebDriver support"
https://code.google.com/p/chromiumembedded/issues/detail?id=549

It should now be possible to use ChromeDriver with CEF (https://code.google.com/p/chromiumembedded/issues/detail?id=549#c15), well there are a few conflicting reports on the bug report, but that is the consensus.

The type of errors I'm seeing are varied.

Using the code base as is, I get a strange error message "version info not a dictionary" which I see from the following bug report. Although I believe this has nothing to do with the version of the code base but a wonky EXE, (we have had some internal bug reported on our browser).

"Issue 316: Poor error message "version info not a dictionary" when instantiating ChromeDriver"
http://code.google.com/p/chromedriver/issues/detail?id=316


When I downloaded the latest cefclient for my branch 1453 (paired with Chromium 27.0.1453.116) and I run our tests I get nothing but failures with the following error message:

unknown error: "Cannot get automation extension"

I do not see anyone else coming up with this issue. Note that these tests currently do still run and pass in Chrome.

Any help ye can provide to shed some light on my issues would be much obliged.

Kind Regards
- Matt

Ken Kania

unread,
Sep 23, 2013, 1:48:19 PM9/23/13
to matt....@gmail.com, chromedri...@googlegroups.com
The first error, 'version info not a dictionary', is because chromium isn't reporting a valid response for the /version HTTP request.  This is usually because the version of Chrome you are using is too old.  If you turn on verbose logging (see https://sites.google.com/a/chromium.org/chromedriver/logging), you can see what CEF is returning for the /version HTTP request and compare that with what Chrome is returning.

The other error 'Cannot get automation extension', means that for some reason the extension we install with ChromeDriver for automation purposes isn't loading properly.  I might be able to help if I you could attach the chromedriver.log with verbose logging enabled (see the site I listed above).

Ken



--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Matthew Cunningham

unread,
Sep 24, 2013, 5:58:48 AM9/24/13
to Ken Kania, chromedri...@googlegroups.com
Hey Ken,

Thanks for getting back to me, please find attached a sample log output.

Matt


--
You received this message because you are subscribed to a topic in the Google Groups "ChromeDriver Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/chromedriver-users/KcJuAQuoOsM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromedriver-us...@googlegroups.com.
merged.log

Ken Kania

unread,
Sep 24, 2013, 2:10:26 PM9/24/13
to Matthew Cunningham, chromedri...@googlegroups.com
Thanks for the log.  For this case, it looks like you are calling the maximize command, which is returning the "unknown error: cannot get automation extension\nfrom unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html" error.  That is because ChromeDriver depends on the automation Chrome extension which it was unable to contact, most likely because CEF doesn't support Chrome extensions.

Fortunately, if you just want to maximize the window, instead of calling maximize, you can pass in --start-maximized as a command line argument instead.  If this is not sufficient for you, we'd have to implement the maximize command in DevTools instead of via the automation extension, which isn't too difficult, but is not a trivial effort.

Ken

Matthew Cunningham

unread,
Sep 25, 2013, 9:01:56 AM9/25/13
to Ken Kania, chromedri...@googlegroups.com

Hey Ken,

Thanks for getting back to me, that solved my problem, I am now able to control my CEF client! :D We were maximizing through the driver out of convenience. We had a task opened regarding solving that starting full screen anyway, so happy days.

- Matthew
Reply all
Reply to author
Forward
0 new messages