Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/
In Selenium web automation, test automation services uses following to minimize the firefox window using JAVA:
driver.manage().window().setPosition(new Point(-2000, 0)) Test automation services also use below mentioned steps : Dimension n = new Dimension(360,592); driver.manage().window().setSize(n); Using C#, below mentioned step can be used set the position of browser window:
driver.Manage().Window.Position = new System.Drawing.Point(x, y);
Robot key events are the ideal way to do that. Selenium has JavaScript in in core. Minimizing the browser window is beyond the scope of JavaScript, so even selenium can no do that. So, the ideal way is to use Robot classes.
Apart from this, if you just want browser window to be out of your sight, you can use below command to move the window away.
driver.manage().window().setPosition(new Point(-2000, 0));
This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!
1.4k questions
1.6k answers
866 comments
1.9k users