Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8359851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:17:08+00:00 2026-06-09T11:17:08+00:00

i am using selenium web driver for the test automation work for a web

  • 0

i am using selenium web driver for the test automation work for a web site. In that web site there is a page where it display details of a purchase order. It has multiple tables with no id/name associated with them. The design is using just “td” and “tr” elements. Each table can contain multiple rows,columns depending on the purchase order. I want to validate each and every field with given values. How can i get these dynamic details using Xpath?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:17:10+00:00Added an answer on June 9, 2026 at 11:17 am

    You can get the total number of <tr> tags within a <td> tag by giving the xpath of the <td> element by using this function –

    List<WebElement> ele = driver.findElements(By.xpath("Xpath of the table"));
    

    Now you can use a for each loop to loop through each of the <tr> tags in the above list and then read each value by using getText() method.

    Let me know if this helps you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a test script using Selenium web driver (IE). I had no
Is it a good idea to start new test framework using Selenium web driver
If I'm using cucumber/capybara with a selenium web driver to test, do I need
I'm trying to write a Selenium test for a web page that uses an
I'm writing automated UI tests in C# using Selenium 2 Web Driver for web
I'm using Selenium 2.0 web driver. My script fails occasionally whenever I try locating
I am a manual tester and am learning automation testing and using Selenium web
I am facing an issue in automating a web application using selenium web driver.
I need to test web API functions in REST format. Currently using Selenium RC
I am using Selenium Web Driver API with Java. Every time I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.