Does Selenium support Google Android Operating System?

Yes, Selenium Web Driver or Google Web Driver or Selenium 2.0 supports Android Operating System. There are several libraries written to support Android Operating System.
Fri, 07/15/2011 - 04:35 — Visitor
selenium android driver testing
try this .... this is cool ... ;)
public class OneTest extends TestCase {
public void testGoogle() throws Exception {
AndroidDriver driver = new AndroidDriver();
// And now use this to visit Google
driver.get("http://google.com");
Thread.sleep(15000);
// Find the text input element by its name
WebElement element = driver.findElement(By.name("q"));
// Enter something to search for
element.sendKeys("hotmail");
//driver.findElement(By.name("q")).sendKeys("niloy.cit");
// Now submit the form. WebDriver will find the form for us from the element
element.submit();
//driver.findElement(By.name("btnG")).click();
// Check the title of the page
System.out.println("Page title is: " + driver.getTitle());
driver.quit();
}
}
how i can give command to a already run webdriver to open an application or websight in emulator or real device ??

0 comments: