heynemann/pyccuracy — Issue #73: Actions should accept CSS selectors as element names
Author: pgergo
Created: 2011-12-14 15:28:00+00:00
State: open

Currently SeleniumElementSelector transforms element names from actions, and only outputs Xpath strings matching id and name attributes, but Selenium also accepts other types of selectors, such as "css=div.mydiv". It would be very nice to let actions use these selectors, because it also allows more complex expressions. An arbitrary element type can be used for this, say "css". For this only two steps are necessary, defining an additional staticmethod for SeleniumElementSelector, and extending the list of supported elements in the language files with the new type. This can be performed with a bit of metaprogramming magic from hooks, but implementing it in the codebase is a much cleaner solution. Please, consider it.