Initialize the Web Driver
WebDriver driver = new FirefoxDriver();
Navigate to Web Page.
driver.get("http://www.google.com");
Navigate to particular button and Click on It.
driver.findElement(By.id("idname")).click();
Wait using driver Manage
driver.manage().wait(3000);
Typing the Keys in TextBox.
driver.findElement(By.id("userid")).sendKeys("bposthkseller1");
Click on Submit Button.
driver.findElement(By.id("sgnBt")).submit();
driver.manage().wait(3000);
Click on Link which contains Text.
driver.findElement(By.linkText("Preferences")).click();
Click on Button with XPath Value.
driver.findElement(By.xpath("//li[2]/span[2]/div")).click();
WebDriver driver = new FirefoxDriver();
Navigate to Web Page.
driver.get("http://www.google.com");
Navigate to particular button and Click on It.
driver.findElement(By.id("idname")).click();
Wait using driver Manage
driver.manage().wait(3000);
Typing the Keys in TextBox.
driver.findElement(By.id("userid")).sendKeys("bposthkseller1");
Click on Submit Button.
driver.findElement(By.id("sgnBt")).submit();
driver.manage().wait(3000);
Click on Link which contains Text.
driver.findElement(By.linkText("Preferences")).click();
Click on Button with XPath Value.
driver.findElement(By.xpath("//li[2]/span[2]/div")).click();
No comments:
Post a Comment
Thanks for your valuable comments