[Feature]: Codegen could have an option for more specific locators
🚀 Feature Request
This is a wonderful project, but I do find almost all Codegen tests need extensive manual cleanup.
In particular, clicking a button that is inside a table row sometimes seems to produce a locator that is not aware of what row it's in.
Also, clicking a button inside a div will select just that button, without being aware that there could be other similar buttons in similar divs.
It would be really cool if the locator choosing algorithm could use the chain of nested headers, the table rows, etc
Example
I make a list of sales, each one represented as a card div, and each having an edit button or some action like that.
In the Codegen, I select an edit button, and am prompted to choose a selector, with options for selectors representing things like "A button named edit that is the descendent of a div with header "Jun 30", inside a div with header "Sales".
Motivation
It would allow for less manual editing of Codegen tests.
agree. sometimes i need xpath or another relative locator but it gives me by text or another type which is not consistent for my test.
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.