congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FirefoxDriver.findElements
Code IndexAdd Tabnine to your IDE (free)

How to use
findElements
method
in
org.openqa.selenium.firefox.FirefoxDriver

Best Java code snippets using org.openqa.selenium.firefox.FirefoxDriver.findElements (Showing top 10 results out of 315)

origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByXPath(String using) {
  return findElements("selectElementsUsingXPath", using);
}
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsById(String using) {
  return findElements("selectElementsUsingId", using);
}
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByLinkText(String using) {
 return findElements("selectElementsUsingLink", using);
}
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByName(String using) {
  return findElements("selectElementsUsingName", using);
}
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByPartialLinkText(String using) {
 return findElements("selectElementsUsingPartialLinkText", using);
}
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByTagName(String using) {
 return findElements("selectElementsUsingTagName", using);
}

origin: stackoverflow.com

List<WebElement> listAllRadioButtons= driver.findElements(By.cssSelector("input[type='radio']"));
List<WebElement> listAllRadioButtonsChecked= driver.findElements(By.cssSelector("input[type='radio']:checked"));
List<WebElement> listAllRadioButtonsFromTable = driver.findElements(By.cssSelector("table>tbody>tr>td>input[type='radio']"));
List<WebElement> listAllRadioButtonsFromTableChecked = driver.findElements(By.cssSelector("table>tbody>tr>td>input[type='radio']:checked"));
List<WebElement> listCol = driver.findElements(By.cssSelector("table>tbody>tr>td:nth-child("+colNumber+")"));
List<WebElement> listColRadioButton = driver.findElements(By.cssSelector("table>tbody>tr>td:nth-child("+colNumber+")>input[type='radio']"));
List<WebElement> listColRadioButtonChecked = driver.findElements(By.cssSelector("table>tbody>tr>td:nth-child("+colNumber+")>input[type='radio']:checked"));
List<WebElement> listRowRadioButton = driver.findElements(By.cssSelector("table>tbody>tr:nth-child("+rowNumber+")>td>input[type='radio']"));
List<WebElement> listRowRadioButtonChecked = driver.findElements(By.cssSelector("table>tbody>tr:nth-child("+rowNumber+")>td>input[type='radio']:checked"));        
origin: org.openqa.selenium.webdriver/webdriver-firefox

public List<WebElement> findElementsByClassName(String using) {
 if (using == null)
  throw new IllegalArgumentException("Cannot find elements when the class name expression is null.");
 if (using.matches(".*\\s+.*")) {
  throw new IllegalLocatorException(
    "Compound class names are not supported. Consider searching for one class name and filtering the results.");
 }
   
 return findElements("selectElementsUsingClassName", using);
}
origin: stackoverflow.com

 FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.google.com");
List<WebElement> links = driver.findElements(By.cssSelector("#gbw a.gb_P"));
for (WebElement link : links)
{
  System.out.println(link.getText().trim());
}
origin: stackoverflow.com

 FirefoxDriver driver = new FirefoxDriver();
driver.get("https://www.youtube.com/watch?v=JcbBNpYkuW4");

WebElement element = driver.findElementByCssSelector("#watch-discussion");
System.out.println(element.getText()); // this prints: loading..

// scrolll down so that comments start to load
driver.executeScript("window.scrollBy(0,500)", "");

Thread.sleep(20000);

List<WebElement> iframes = driver.findElements(By.xpath("//iframe"));

for(WebElement e : iframes) {       
  if(e.getAttribute("id") != null && e.getAttribute("id").startsWith("I0_")) {
  // switch to iframe which contains comments
  driver.switchTo().frame(e);
  break;
  }
}

// fetch all comments
List<WebElement> comments = driver.findElements(By.xpath("//div[@class='Ct']"));
for(WebElement e : comments) {      
  System.out.println(e.getText());
}
org.openqa.selenium.firefoxFirefoxDriverfindElements

Popular methods of FirefoxDriver

  • <init>
  • manage
  • get
  • getTitle
  • quit
  • connectTo
  • findElement
  • findElementByCssSelector
  • ExecuteScript
  • FindElement
  • FindElementByXPath
  • Manage
  • FindElementByXPath,
  • Manage,
  • Quit,
  • close,
  • convertToJsObject,
  • convertToJsObjects,
  • dropCapabilities,
  • execute,
  • executeScript

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JTable (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now