Reputation: 3
I used the following command to minimize chrome browser:
driver.manage().window().setPosition(new Point(0,-1000));
But later when I clicked on chrome browser in toolbar to maximize, its not maximizing.
Can anybody help on this one please, why its not working?
Upvotes: 0
Views: 211
Reputation: 1113
The reason is that the command you're using doesn't Minimize the window, it moves its position off screen. So when you're clicking in the toolbar it will be minimizing/maximizing as you click, but you just can't see it.
If you wish to make the window visible again later in your code you can just reset the window position with
driver.manage().window().setPosition(new Point(0,0))
Upvotes: 1