3

I use one instance of the browser. When I run multiple tests, during the first test the browser window is maximized. At the start of the second test, the browser window size changes to the default size. At the start of the third test, the window is maximized and at the start of the fourth test, window size changes to the default size...etc.

This occurred when using the latest version of WebDriver - GeckoDriver 0.18.0. With previous version of WebDriver, the browser window size has remained maximized during all tests.

And I use the latest version of web browser Firefox 55.0.3.

With browser Chrome or IE it works well.

All test scripts contains driver.Manage().Window.Maximize();

Any idea why this is happening?

And how to fix it?

asked Sep 20, 2017 at 10:57
2
  • This is a weird behavior. Can you add your code for better debugging? Commented Sep 22, 2017 at 17:43
  • Sometime it happens Commented Sep 26, 2017 at 9:18

2 Answers 2

2

These kind of problems might arise when updating your Firefox version. If it worked well before the update then my suggestion would be to look for any updates for the GeckoDriver and download it.

Version 0.19 has been released, I recommend you update and try again

Bharat Mane
6,78512 gold badges42 silver badges69 bronze badges
answered Oct 27, 2017 at 1:11
1

try this

var width_size = 1024;
var width_size = 786;
driver.manage().window().setSize(width_size , width_size );
answered Sep 26, 2017 at 9:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.