package selenium_examples;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Sample {
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.co.in/preferences?hl=en#languages");
driver.findElement(By.linkText("Edit")).click();
Listcheckboxes=driver.findElements(By.xpath("//input[@type='checkbox']"));
System.out.println("Total Checkboxes ="+checkboxes.size());
}
}
Output :-
Total Checkboxes =46
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Sample {
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.co.in/preferences?hl=en#languages");
driver.findElement(By.linkText("Edit")).click();
List
System.out.println("Total Checkboxes ="+checkboxes.size());
}
}
Output :-
Total Checkboxes =46
No comments:
Post a Comment