How to Handle Pagination in Selenium Webdriver | How to Handle Dynamic WebTable|Webtable Pagination

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024
  • Please use the following link to install the Katalon Studio:
    katalon.com/si... Check Tubebuddy Features Here:
    www.tubebuddy.... In this video will discuss how to handle pagination functionality in selenium webdriver. If you want to read the data from a webtable and that table having pagination then we need to read the data from all the pages then we can you for loop or while loop to loop through all the pages in the webtable pagination and then we can read all the data from the dynamic webtable in selenium webdriver.
    Facebook : / automationtesting2016
    LinkedIn : www.linkedin.c...
    Google+ : plus.google.co...
    Twitter : / krishnasakinala
    Website : automationtesti...

ความคิดเห็น • 39

  • @sadakarp
    @sadakarp 4 ปีที่แล้ว +2

    Hi Krishna, this is an excellent tutorial. My project is entirely of data tables and the same procedure worked seamlessly . thank you a ton for making paths for automation newbies like me.

    • @KrishnaSakinala
      @KrishnaSakinala  4 ปีที่แล้ว

      Glad it helped...
      Please subscribe to the channel and keep visiting ... :)

  • @vikramkadam3935
    @vikramkadam3935 5 หลายเดือนก่อน

    bro your code best it is very helpful for me i have been trying for 2 days but just by looking your video i find best solution

  • @sadakarp
    @sadakarp 4 ปีที่แล้ว +2

    I happen to discuss about pagination logic and calculating the count of rows with one of my team members today and given tries for alternative solutions if we could find any. We discovered that this can also be done using jQuery "length" function.
    Here is our alternative approach.
    1. Wait for sometime to load the page where data table is present.
    2. Take an integer variable with 0 as the default
    3. Create an object for JavascriptExecutor
    4. Find the length of the data table using jQuery "length" function
    5. jQuery stores the value in Object so convert it into integer and store the jquery returned length in an integer variable say "a".
    6. Find the displayed count from bottom of the page and store it in another integer variable say "b"
    7. Compare the values of "a" and "b".
    8. If a==b then "displayed row count is equals to data table row count " else "displayed row count is NOT equals to data table row count".

  • @KaranSharma-lm6eh
    @KaranSharma-lm6eh 2 ปีที่แล้ว

    Thank you so much Krishna, this has been very helpful to me. Very well explained !!

  • @monalisapanda7825
    @monalisapanda7825 2 ปีที่แล้ว

    Hi Sir.This tuitorial is really great.This a long pending topic for me to look into and its really really helpful.You explained it very well.Thank you...

  • @ვ3ვ3ვ
    @ვ3ვ3ვ 8 หลายเดือนก่อน +1

    Thenk yu for great video ❤

  • @Testing_QualityAnalyst_Channel
    @Testing_QualityAnalyst_Channel 8 หลายเดือนก่อน

    Great explained, thank you!

  • @satishkvs156
    @satishkvs156 3 ปีที่แล้ว

    Very Nice Explanation Saikrishna

  • @swethaputti
    @swethaputti 3 ปีที่แล้ว

    Thank you so much Krishna, it really helped me.

  • @cyrilgeorge870
    @cyrilgeorge870 5 ปีที่แล้ว +3

    It would be really helpful if u share ur code in git as per the date of each video to cross check

  • @abuthahir9342
    @abuthahir9342 3 ปีที่แล้ว +1

    Thank you very useful

  • @navenreddyaleti7446
    @navenreddyaleti7446 5 ปีที่แล้ว

    Nice Saikrishna.

  • @nikunjkumar555
    @nikunjkumar555 4 ปีที่แล้ว +1

    Great Technique, appreciated :)

    • @KrishnaSakinala
      @KrishnaSakinala  4 ปีที่แล้ว +1

      My pleasure! Please subscribe to the channel and keep visiting😀

  • @KaranSharma-lm6eh
    @KaranSharma-lm6eh 2 ปีที่แล้ว

    Can we implement the same logic through Javascript ? If yes, any example if possible.

  • @rohitkumark2087
    @rohitkumark2087 3 ปีที่แล้ว

    Very nice

  • @gandhigeerthana2058
    @gandhigeerthana2058 6 หลายเดือนก่อน

    What we need to do if getting no such element error. The xpath taken also correct means

  • @shanmukharaju3938
    @shanmukharaju3938 3 ปีที่แล้ว

    is we can use xpaths instead of id.?

  • @sireeshach6535
    @sireeshach6535 4 ปีที่แล้ว +1

    Here you told with pagination..can you explain how to count with scroll..if u assume myntra when you scroll down some products will be loaded..so what should we do to get the whole count

    • @KrishnaSakinala
      @KrishnaSakinala  4 ปีที่แล้ว

      Can you tell me the steps what exactly you want to do?

    • @sireeshach6535
      @sireeshach6535 4 ปีที่แล้ว

      @@KrishnaSakinala I am not able to scroll within a webpage.can you tell me how to do that

  • @veerababupanasa4592
    @veerababupanasa4592 ปีที่แล้ว

    Hi sir why ur taking class attribute (line no 30)
    Already u taken id in that same line

  • @sapangupta4039
    @sapangupta4039 4 ปีที่แล้ว +1

    Can you tell me what if the next button is not present on last page?What changes i need to make in this code?

    • @KrishnaSakinala
      @KrishnaSakinala  4 ปีที่แล้ว +1

      check for non existence of the button.
      Please subscribe to the channel and keep visiting ... :)

  • @SA-iv2rg
    @SA-iv2rg 4 ปีที่แล้ว

    What do you do if there is no next button on the last page. If last page doesn't contain a next button, do you change to.contains(null)?

  • @pandithatchinadhanasekar8016
    @pandithatchinadhanasekar8016 4 ปีที่แล้ว

    My scenarios is adding one use and I need to check the user with status in pagination table so kindly help me to do this

  • @swathireddy3597
    @swathireddy3597 4 ปีที่แล้ว

    Hi sir I used same code is working fine but from web table it's not reading all the rows for 350 rows it's reading 309 rows some rows are not reading I debuged the code but failed where is happens

    • @sadakarp
      @sadakarp 4 ปีที่แล้ว

      It happens in my case in very first page where it counts only one row. Thread.sleep(10000) helped me to get the correct count.
      Thread.sleep(10000);
      List namesElements = driver.findElements(By.cssSelector("#accounts>tbody>tr>td:nth-child(1)"));
      System.out.println("size of names elements : "+namesElements.size());

  • @srujani1977
    @srujani1977 4 ปีที่แล้ว

    How would I be able to display all the values(columns) of each row instead of just the name as specified in the example above?

    • @bandolero7679
      @bandolero7679 4 ปีที่แล้ว

      In case you didn't figure it out, this is what I did for something similar:
      1. Get the TR rows in the corresponding table:
      IList GroupUsersRows = chrmdriver.FindElements(By.CssSelector("#userSearchResults > table:nth-child(3) > tbody:nth-child(1) > tr"));
      2. Iterate through the rows and extract the last name, first name and email columns(had to use .Skip(1) since those were the Table headers):
      /***each row I was reading from had id="Row{N}Col(0-9)", so even though went witha foreach, I had to use this counter as well to to take this into account..***/
      int r = 1;
      foreach (IWebElement gUser in GroupUsersRows.Skip(1))
      {
      string lastName = gUser.FindElement(By.Id($"Row{r}Col0")).Text;
      string firstName = gUser.FindElement(By.Id($"Row{r}Col1")).Text;
      string email = gUser.FindElement(By.Id($"Row{r}Col4")).Text.Trim();
      r++;
      ....
      }
      Hope this helps!!

  • @aneeshkarthikrajaramhebbar1500
    @aneeshkarthikrajaramhebbar1500 ปีที่แล้ว

    Your latest tut videos??

  • @aneeshkarthikrajaramhebbar1500
    @aneeshkarthikrajaramhebbar1500 ปีที่แล้ว

    Where is package?

  • @nareshshama1982
    @nareshshama1982 4 ปีที่แล้ว +1

    and how will do the same thing in protractor ?