Utility to read excel data based on column name in Selenium Java

Sdílet
Vložit
  • čas přidán 4. 09. 2024
  • This video will explain, how to create an utility class or methods to
    set the excel file path & sheet name
    Read the cell data based on String, numeric etc
    Read data based on row & column index
    Read the data based on column name and row index
    Utilise the methods in selenium tests
    Apache POI maven dependency -
    POI & POI-ooxml
    mvnrepository....
    Blog - qavalidation.c...

Komentáře • 18

  • @manikandansivaraman8451

    Why we use a constructor to read test data from external sources such as Excel sheets!

  • @jonah3037
    @jonah3037 Před 2 lety

    Like you mentioned atlast, how to compare value of excel with text present on website?
    It's for scriptless test execution.

  • @mrcoin5305
    @mrcoin5305 Před 3 lety

    Thankyou boss

  • @AutomationWithDiksham

    Hi sir, i am getting Cannot invoke "org.apache.poi.xssf.usermodel.XSSFSheet.getRow(int)" because "this.sheet" is null error please suggest what is the issue

  • @RaviTeja-bz6bv
    @RaviTeja-bz6bv Před 3 lety

    Hi ...could you integrating this excel reader into cucumber bdd framework to fetch the test data ...

  • @eyalavramchik8338
    @eyalavramchik8338 Před 3 lety

    Hi,
    How can I search for header String (location can change but remain in first line with other headers) based on the column string name and then get all the cells beneath?

    • @qavbox
      @qavbox  Před 3 lety

      You need not to worry if you are swapping column names, you can still use same code because we get the index of column names on run time

    • @eyalavramchik8338
      @eyalavramchik8338 Před 3 lety

      @@qavbox and how can I get the cells beneath the selected column name ?
      Thanks !

    • @qavbox
      @qavbox  Před 3 lety

      @@eyalavramchik8338 create a for loop with no. Of rows excel has data, inside for loop call the getcelldata method with parameters as getcelldata(columnName, index)

  • @miguelantonioescuderoperal7485

    HashMap has error :/ public Map columns = new HashMap();

    • @qavbox
      @qavbox  Před 2 lety

      What's the error you getting?

  • @nithiblossom
    @nithiblossom Před rokem

    How.to.read.Date type from excel

    • @qavbox
      @qavbox  Před rokem

      You can refer to this code block -
      github.com/sunilpatro1985/SeleniumJavaFramework/blob/main/src/main/java/base/ExcelReader.java