Selenium WebDriver Tips And Tricks

Sometimes you need to take tricky actions on software web application page. Selenium webdriver software testing tool do not have any direct method to perform such tricky actions. So you need to use some tricks in your webdriver test script to perform some actions on software web application page. Bellow given links will show you some tricks using which you can perform complex actions In selenium webdriver tests very easily. BTW, You can start from selenium java tutorial if you are beginner.


  1. How To Get X Y Coordinates Of Element
  2. How To Get Height And Width Of Element
  3. How To Capture Element Screenshot
  4. How To Disable JavaScript Using Custom Profile
  5. Selecting Checkbox Using Position() and last() Functions In XPath
  6. Select Checkbox From Table using Preceding/Following Sibling
  7. Set/Get Window Position And Size In Selenium Test
  8. Handling Stale Element Reference Exception In Selenium 
  9. Scroll Down-Up Web Page In Selenium Webdriver
  10. Verify Scroll Present On Browser In Selenium WebDriver Test
  11. How To Record Selenium WebDriver Test Execution Video
  12. Zoom In And Zoom Out Page In Selenium Test
  13. Wait For Page To Load/Ready In Selenium
  14. Capture Page JavaScript Errors Using WebDriver
  15. Open New Tab And Switching Between Tabs In WebDriver
  16. Switching between Iframes In webdriver
  17. Handle SSL Certificate Error In FF For Selenium WebDriver
  18. Set Proxy Settings In Selenium WebDriver
  19. Automating Pie Chart In Selenium WebDriver
  20. WebDriver Element Locator Add-On To Get XPath
  21. Closing All Tabs Using Robot Class In Selenium
  22. Data Driven Test Using CSV File In Selenium
selenium example, selenium webdriver, webdriver selenium example, webdriver example java, webdriver tutorial, selenium webdriver tutorial, webdriver testng example, webdriver wait, selenium webdriver download, selenium webdriver examples

9 comments:

  1. All the posts are very nice !!!!!!!!!!
    keep it up......

    ReplyDelete
  2. post read/write excel data

    ReplyDelete
    Replies
    1. import java.io.File;
      import java.io.FileInputStream;

      import org.apache.poi.ss.usermodel.Cell;
      import org.apache.poi.ss.usermodel.Row;
      import org.apache.poi.ss.usermodel.Sheet;
      import org.apache.poi.ss.usermodel.Workbook;
      import org.apache.poi.ss.usermodel.WorkbookFactory;

      class ReadExcelFile{
      public static void main(String args[]){
      try{

      Workbook workBook;
      Sheet sheet;
      int numOfRows, numOfCols;
      Row row;
      Cell col;

      File file;
      FileInputStream fInputStream;

      file = new File("InputFiles\\LoginCreds.xlsx");
      fInputStream = new FileInputStream(file);

      workBook = WorkbookFactory.create(fInputStream);
      sheet = workBook.getSheet("Sheet1");

      numOfRows = sheet.getLastRowNum();

      for(int i=1;i<=numOfRows;i++){
      row = sheet.getRow(i);
      numOfCols = row.getLastCellNum();
      for (int j=0;j<numOfCols;j++){
      System.out.println(row.getCell(j).getStringCellValue());
      }
      }

      fInputStream.close();

      }catch(Exception e){

      }

      }
      }

      Delete
  3. Hi Nizams




    import java.io.File;
    import java.io.FileInputStream;

    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Sheet;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;

    class ReadExcelFile{
    public static void main(String args[]){
    try{

    Workbook workBook;
    Sheet sheet;
    int numOfRows, numOfCols;
    Row row;
    Cell col;

    File file;
    FileInputStream fInputStream;

    file = new File("InputFiles\\LoginCreds.xlsx");
    fInputStream = new FileInputStream(file);

    workBook = WorkbookFactory.create(fInputStream);
    sheet = workBook.getSheet("Sheet1");

    numOfRows = sheet.getLastRowNum();

    for(int i=1;i<=numOfRows;i++){
    row = sheet.getRow(i);
    numOfCols = row.getLastCellNum();
    for (int j=0;j<numOfCols;j++){
    System.out.println(row.getCell(j).getStringCellValue());
    }
    }

    fInputStream.close();

    }catch(Exception e){

    }

    }
    }

    ReplyDelete
  4. import java.io.File;
    import java.io.FileInputStream;

    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Sheet;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;

    class ReadExcelFile{
    public static void main(String args[]){
    try{

    Workbook workBook;
    Sheet sheet;
    int numOfRows, numOfCols;
    Row row;
    Cell col;

    File file;
    FileInputStream fInputStream;

    file = new File("InputFiles\\LoginCreds.xlsx");
    fInputStream = new FileInputStream(file);

    workBook = WorkbookFactory.create(fInputStream);
    sheet = workBook.getSheet("Sheet1");

    numOfRows = sheet.getLastRowNum();

    for(int i=1;i<=numOfRows;i++){
    row = sheet.getRow(i);
    numOfCols = row.getLastCellNum();
    for (int j=0;j<numOfCols;j++){
    System.out.println(row.getCell(j).getStringCellValue());
    }
    }

    fInputStream.close();

    }catch(Exception e){

    }

    }
    }

    ReplyDelete
  5. How to highlight the page title using webdriver?

    ReplyDelete
  6. How to highlight the title of a page using webdriver?

    ReplyDelete
    Replies
    1. Title can we highlight manually ? I think we can highlight only webelement which are present on the webpage. But title is in title bar.

      Delete