Created
July 12, 2011 08:50
-
-
Save krmahadevan/1077645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void iamfiguringout(){ | |
FirefoxDriver driver = new FirefoxDriver(); | |
Selenium s = new WebDriverBackedSelenium(driver, "http://www.google.com"); | |
Reporter.log("WDBS object created", true); | |
s.open("http://www.google.co.in/"); | |
Reporter.log("URL opened", true); | |
String url = "window.open('intl/en/about.html','mywindow');"; | |
s.openWindow("intl/en/about.html", "mywindow"); | |
Reporter.log("new window opened", true); | |
printerValues("Window names", s.getAllWindowNames()); | |
printerValues("Window IDs", s.getAllWindowIds()); | |
printerValues("Window Titles",s.getAllWindowTitles()); | |
s.close(); | |
} | |
public void printerValues(String string, String[] array){ | |
Reporter.log(string, true); | |
for (String value : array){ | |
Reporter.log(value, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment