Automation Practice | Selenium Forum
M
Posted on 27/09/2016
Hi Ashish,
I am trying to automate a simple Website. Below is the functionality of the site.

1. On this site after successfully login i need to click on all "Hand image button" under 'Action' column one by one. And when i click this a new window page is open and it will be open only for 30 Seconds, after 30 Seconds this window is automatically closed.

My Script is working fine. But i want to know when a new window page is open how can i minimize it through my script currently i have to do it manually.

[b:3sj9maza]Screen Shot Attached.[/b:3sj9maza]

[b:3sj9maza] I tried to getWindowHandles(); and switch to that window but don't know how to minimize it so please suggest me how can i handle it.[/b:3sj9maza]

M
Replied on 27/09/2016

Please suggest me..


M
Replied on 28/09/2016

have an alternate solution that may meet your needs. You can set the position of the WebDriver to be outside of your view. That way, it'll be out of sight while it runs. (It may start at a visible location, but it will only be there for an instant.)

FirefoxDriver driver = new FirefoxDriver();
driver.manage().window().setPosition(new Point(-2000, 0));