We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

Category: Selenium Tutorial

How to read Excel file using Selenium WebDriver

Below is a basic code on how to read excel file. As per your requirement you can read the data for excel and play around it. < View plain text > java import;   import;   import;   import org.apache.poi.hssf.usermodel.HSSFWorkbook;   import;   import;   import;   import org.apache.poi.xssf.usermodel.XSSFWorkbook; […]

How to select a value from a dropdown ?

We can select a value from a dropdown by using WebDriver’s Select class. Syntax: < View plain text > java selectByValue: Select selectByValue = new Select(driver.findElement(“SelectID_One”))); selectByValue.selectByValue(“greenvalue”);   selectByVisibleText: Select selectByVisibleText = new Select (driver.findElement(“SelectID_Two”))); selectByVisibleText.selectByVisibleText(“Lime”);   selectByIndex: Select selectByIndex = new Select(driver.findElement(“SelectID_Three”))); selectByIndex.selectByIndex(2); < View plain text > java public Select(WebElement element) A check […]

Page 1 of 212 © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!