-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed element id #11834
Comments
@birbird have you searched and/or posted on Stack Overflow yet for your testing question? Perhaps reach out in the embercommunity.slack.com group in the #testing channel as well. Since this is more of a question then an issue would you consider closing this? |
Will gladly reopen if this turns out to be an actual issue (preventing this from being solved). If it is an issue, a quick reproduction of the problem would be very help |
Hello, We have the same problem. We can't write automated tests because ember always generates new ids and it uses the html id attribute instead of a custom one. Other people (React ) use
I think having something similar in ember is not hard to do and will solve a lot of issues regarding automated tests with selenium or similar tools that need to target elements with precision. Thank you, |
I found a solution for my problems and I'm posting it for other people that get here. If you are using selenium you can use custom data attributes in your ember app instead of using [1] https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes |
Hit this issue today. We're integrating with Zendesk (so we cannot change their html/css etc) and they're using ember which means all the id's change every time the page loads :(. The id is the preferred way to get elements in Selenium and this is a real PITA. We can use Xpath but it's a cheap substitute. |
The dynamically generated element ID attributes pose big challenge to our automated test (function test with tool like Selenium). We can work around the problem by using other attributes, but I think the most straightforward method is fixing the element ID if the dom structure does not change.
Is there any config in ember can achieve that?
Any help will be greatly appreciated!
The text was updated successfully, but these errors were encountered: