splinter
splinter copied to clipboard
ElementAPI.clear() shadows list.clear() in python 3.3+
The following code in python <= 3.2 will call ElementAPI.clear():
browser.find_by_css('foobar').clear()
However, in python 3.3 and forward, the built-in list implements a clear() method. ElementList is a subclass of list, and as such the above code will call ElementList.clear().
The following still calls ElementAPI.clear() in all python versions:
browser.find_by_css('foobar').first.clear()
ElementList probably should not subclass list directly.