Greetings
I am using C# and dotnet framework
I am trying to test a website using Selenium
I first create the Selenium instance like so:
IWebDriver selenium = new RemoteWebDriver(new Uri("http://
127.0.0.1:555/wd/hub"),
DesiredCapabilities.HtmlUnitWithJavaScript());
Then I connect to the target url
driver.Navigate().GoToUrl("
http://1.2.3.4/apex/cape.zul");
then I find the login button
IWebElement clickLogin = driver.FindElement(By.ClassName("z-
toolbarbutton-cnt"));
Then I click the login button
clickLogin.Click();
at this point at window pops up with a username and password textbox.
I am struggling to get the focus of the page to change to the popup
window.
There are quite a few examples on the internet of how to do this:
selenium.waitForPopUp("popupWindowID", "30000");
selenium.selectWindow("name=popupWindowID");
assertEquals(selenium.getTitle(), "Popped Up Window");
However, in my code, IwebDriver does not expose a method
like .selectWindow
Do you know which object exposes .selectWindow or am I missing
something?