• Home

  • Courses

    • Run Java Selenium Tests in Azure Devops
    • Interviewing for Testing Positions
  • For Business

  • Trainings

    • Beginner Selenium (May 2018)
    • Advanced Selenium (Feb 2019)
  • Teacher

  • Bootcamp Info

  • Forum

  • Blog

  • Meetups

    • Test Automation for Responsive Site
    • All about Locators in Selenium Projects
  • More..

    • FAQ
    • Cheat Sheets
    • Presentations
  • More...

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    Oleg K
    May 16, 2018

    Another way to get the total results on search

    in Selenium Questions

    I think a better solution to find the total number of results on the search results page would be using .split method of String ... for example:


    String stringA = "1 - 25 of 2276 items";

    int numberOfResults = Integer.parseInt(stringA.split(" ")[4]);



    3 comments
    0
    3 Comments

    Share Your ThoughtsSign up to leave a comment.

    alexsiminiuc3
    May 16, 2018

    Thats ok.

    Like

    O
    Oleg K
    May 16, 2018

    Yea, sorry if I am a bit ahead of class and such ;)

    Like

    alexsiminiuc3
    May 16, 2018

    Yes, this is possible as well.


    We havent covered it yet as it relies on arrays.

    Like
    3 comments

    © 2021 Vancouver Selenium WebDriver Automation Training