SeleniumLibrary
SeleniumLibrary copied to clipboard
Allow SeleniumLibrary constructor to set default locator attributes.
For now importing selenium library allows to set import arguments like: timeout, implicit_wait, run_on_failure, screenshot_root_directory, plugins, and event_firing_webdriver
Adding default_attributes which will be passed to ElementFinder could allow use other attributes for elements finding, other than default @name and @id. (without creating plugin). Reason is data-something attributes are often used in web app development as labels for automation.
Is your idea to make configurable how the default locator strategy should work. Instead of using name and id attributes user would have possibility configure the attributes for the default strategy. If yes, I think it's good idea. Also perhaps add keywords for the configuration in the run time.
I think it would be good to think some sort of syntax which would allow define multiple attributes with one usage. Also it could be useful to restore the library default.
What you think and would you be willing to make contribution to implemented such feature?
@aaltat - yes, that was my intention. I also agree for contribution.