Wednesday, January 8, 2014

Selenium Webdriver Tutorials -1

1. To find the list of items with tag name and click on particular link or Item.



List<WebElement> Member1 =

driver.findElements(By.tagName("a"));


float Members_Size1 = Member1.size();
  

system.out.println("Provider size is:"+Members_Size1);


Member1.get(2).click();
 

2. How to capture  the Text from alert .


 
Alert alert=
driver.switchTo().alert();
String text = alert.getText();
System.
out.println(text);
alert.accept();

3. Selenium Material Link :
http://www.browserstack.com/automate/java#

No comments:

Post a Comment

TestNG - Can i use the 2 different data providers to same @test methods in TestNG?

public Object [][] dp1 () { return new Object [][] { new Object [] { "a" , "b" }, new Obje...