Reputation: 11
Without clicking a link on the page I am wondering how I can
What I have tried to is run WebDriver.ExecuteScript("window.open(\"about:blank\", \"_blank\", 'width=300, height=250');");
and then WebDriver.Manage().Window.Maximize();
but I don't seem to have control of that window.
Upvotes: 0
Views: 53
Reputation: 980
You have to switch the active window context to the newest window before you can send commands to it like this
driver.SwitchTo().Window(driver.WindowHandles.Last());
After that the commands should go to that window.
Upvotes: 1