Robert Altena
Robert Altena

Reputation: 795

How to move the browser window in Selenium 3?

The following code worked under older versions of Selenium but results in a timeout under Selenium 3:

WebDriver driver = new ChromeDriver();
driver.manage().window().setPosition(new Point(1315, 0));

What is the correct way of moving the browser window in Selenium 3?

Upvotes: 2

Views: 4136

Answers (2)

mbauer
mbauer

Reputation: 116

For python it is driver.set_window_position(-1920,0)

Upvotes: 1

Jay
Jay

Reputation: 69

I believe there is no way native way to resize, or manipulate browser windows in Selenium.

Source: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/1750

The only simple way that I have seen it done in the past is what you did, using a point and setting the position.

Upvotes: 0

Related Questions