re: Selenium WebDriver and Dynamic Locators VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION

I feel like the code in this post doesn't show an example of when you would need to use this technique, however it shows how to use it.

I can imagine a scenario where none of the Selenium selector strategies would apply (perhaps it moves about in the source of the page and shares attributes and classes with other items on the page) but you still need to pin down your element and get an ID for it. This would work in that case.

I'm pretty sure that using Selenium's native selection methods are what you would choose unless you simply can't get your element using them.

code of conduct - report abuse