-
1. Re: How to configure chrome binary correctly in arquillian.xml?
kpiwko Feb 12, 2014 8:15 AM (in response to tilm4nn)Hi Tilmann,
If I understand this document correctly - https://sites.google.com/a/chromium.org/chromedriver/capabilities, you should set up a property named "binary" in arquillian.xml in order to use custom path to Chrome browser binary.
Let me know if that helps.
Karel
-
2. Re: How to configure chrome binary correctly in arquillian.xml?
tilm4nn Feb 12, 2014 8:52 AM (in response to kpiwko)Hi Karel,
thanks for your input and the link provided. The information presented there and the fact that I still get the same exception lead me to a little debugging. Maybe the problem is that the chromedriver cannot find the binary configuration propterty because it expects it inside a ChromeOptions object inside the DesiredCapabilities object. But what we are doing here is just setting a String value inside the DesiredCapabilities object.
So maybe it is not possible at all to configure the chrome binary using arquillian.xml at the moment?
Cheers, Tilmann
-
3. Re: How to configure chrome binary correctly in arquillian.xml?
kpiwko Feb 12, 2014 9:13 AM (in response to tilm4nn)You have discovered a bug, thanks! It might work with previous version of Chrome - although they haven't mentioned this change in changelog - http://selenium.googlecode.com/git/java/CHANGELOG
Hence I filled a bug in Drone - [ARQ-1638] Chrome driver options are not wrapped into ChromeOptions object - JBoss Issue Tracker . I'll make it a part of 1.2.4.Final release.
Thank you once again,
Karel
-
4. Re: How to configure chrome binary correctly in arquillian.xml?
kpiwko Feb 13, 2014 9:07 AM (in response to tilm4nn)Hey Tilmann,
I went through the code and discovered that chrome.binary should be the way to go. ChromeOptions object is not needed so far, because it is actually converted to Capabilities object by ChromeDriver itself.
However, there was a bug in handling deprecation. I fixed that - or I'm going to fix that based on you feedback in ARQ-1638 ;-).
So, could you please try new Drone 1.2.4.Final to see whether that fixes your issue? Is it released in JBoss Maven Staging repository - that's how you enable it:
Many thanks,
Karel
-
5. Re: How to configure chrome binary correctly in arquillian.xml?
kpiwko Feb 20, 2014 8:36 AM (in response to kpiwko)Did you have chance to try the fix?
Thanks,
Karel
-
6. Re: How to configure chrome binary correctly in arquillian.xml?
tilm4nn Jul 18, 2014 7:27 AM (in response to kpiwko)Hi Karel,
Thanks for looking into this. Sadly I was occupied with other projects till now. Today I had the chance to check it out. While your fix resolves the warning about the deprecated capability it does not solve the problem with the binary configuration itself. What is handed to the WebDriver now (that does not work) is:
{ "desiredCapabilities":{ "platform":"ANY", "browserName":"chrome", "chrome.binary":"D:\\testtools\\GoogleChromePortable\\App\\Chrome-bin\\chrome.exe", "version":"" } }
As mentioned before is seems that chrome webdriver (I am using v2.9) ignores the capability "chrome.binary" and expects a chromeOptions object instead. The following has been verified to work for me:
System.setProperty("webdriver.chrome.driver", "D:\\testtools\\chromedriver\\chromedriver.exe"); ChromeOptions options = new ChromeOptions(); options.setBinary("D:\\testtools\\GoogleChromePortable\\App\\Chrome-bin\\chrome.exe"); WebDriver driver = new ChromeDriver(options); driver.get("http://www.jboss.org"); driver.quit();
Wich in turn leads to the following send to the webdriver:
{ "desiredCapabilities":{ "platform":"ANY", "browserName":"chrome", "chromeOptions":{ "binary":"D:\\testtools\\GoogleChromePortable\\App\\Chrome-bin\\chrome.exe", "args":[], "extensions":[] }, "version":"" } }
In arquillian.xml I tried to add a property called chromeOptions with value
{"binary":"D:\testtools\GoogleChromePortable\App\Chrome-bin\chrome.exe","args":[],"extensions":[]}
But of course this won't work. The ChromeDriver is doing string escaping to JSON correctly here
Is there another way I can put it into arquillian.xml so that the above is generated or is there still a fix in drone required?
Cheers, Tilmann
-
7. Re: How to configure chrome binary correctly in arquillian.xml?
kpiwko Jul 21, 2014 8:05 AM (in response to tilm4nn)Thanks for investigation. In such case we need to fix Drone - to transparently pass value of chromeBinary from capability to ChromeOptions.
See https://issues.jboss.org/browse/ARQ-1823
Karel