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 8140667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:14:21+00:00 2026-06-06T12:14:21+00:00

I am using webdriver for test automation on site which code is auto-generated probably

  • 0

I am using webdriver for test automation on site which code is auto-generated probably in GWT.
All id’s are in form like “x-auto-4009” which is not to reliable way of getting to elements.
I have page with something like form.
It’s like

  Label name    |   <---- Input ---->
  Label name    |   <---- Input ---->
  Label name    |   <---- Input ---->

Each new line is coded as new table in html.
Can you tell me what is the best way of getting to specific Input in more generic way?
I wrote a method that takes a label name and then it finds all elements by tag TR. Next it get’s theese allRows and scans them for labelname. If it’s found then i find within that row elements with tag input and that is my goal. It works fine but it takes some time to do find all those elements and loop through them.
I don’t want to use xpath or locating elements through those fragile id’s.
Can you recommend me any other way of doing that?

Thanks in advance,
regards.

  • 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-06T12:14:24+00:00Added an answer on June 6, 2026 at 12:14 pm

    If you can’t use xpath, I think the only other way to do this would be to alter the code for the page.

    It is possible to set these GWT ID values so that they have a clearer and more consistent value. See: https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCss#widgets.

    Less appealing is the option to give each input a class or name attribute by which you’d identify them, and then search By.class() or By.name().

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

Sidebar

Related Questions

Using capybara 1.0.0 and selenium-webdriver 0.2.0 and in a test I have something like
I am using spanish UTF-8 characters in my WebDriver test which works ok if
I would like to set a text field with watir-webdriver using css selectors to
I have a WebDriver test using the FirefoxDriver that I am attempting to run
Hello all I am using webdriver so if I want to use selenium;s rc
I'm using Selenium Java 2.0b3 . I have this code: ... WebDriver driver =
Using the following simplified test, webdriver fails to find the intended element no matter
We were writing a Selenium test core by using Python webdriver. The main idea
I am using Webdriver implemented through Python to run my selenium test scripts in
I'm using watir-webdriver to drive IE to test a website using a SSL certificate

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.