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.