Skip to main content

Remote Webdriver and Chrome options

  5 posts   Feedicon  
Replies: 4 - Last Post: November 22, 2012 07:55
by: Alexey
showing 1 - 5 of 5
Posted: November 21, 2012 07:54 by Alexey
I'm not sure if it is a Thucydides problem, but maybe someone could answer...
When I use Chrome option -Dchrome.switches="--start-maximized" in local mode, it works fine.
But when I use it together with -Dwebdriver.remote.url=http://some_address:4444/wd/hub, it doesn't work.
Is there any way to use Chrome options with Remote Webdriver in Thucydides?
Posted: November 21, 2012 10:17 by costini
Hi Alexey,

I can't say anything about your problem, but you can workaround the --start-maximized switch from your test doing something like this: getDriver().manage().window().maximize();

This will help you with all the browsers not only Chrome.

Hope this helps!
Posted: November 21, 2012 12:51 by Alexey
Yes, I know about it. But as far as I understand, webdriver is inaccessible from within Thucydides. It can't be configured as in pure WebDriver tests.
Posted: November 21, 2012 13:06 by costini
As far as I know, there are some options that you cannot set on your webdriver (see this thread: and this one:

But you can maximize your browser from your test or from your Page Object class:

A. from you test:
@Managed(uniqueSession = true)
public WebDriver webdriver;

public void myTest() {

B. from your PageObject Class:

public class GenericPage extends PageObject {

public GenericPage(WebDriver driver) {
driver.manage().timeouts().setScriptTimeout(90, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

Posted: November 22, 2012 07:55 by Alexey
Yes, but I'd like to do it just once, when a browser starts, not in every test.
Replies: 4 - Last Post: November 22, 2012 07:55
by: Alexey
Please Confirm