Skip to content

Add expected methods

Compare
Choose a tag to compare
@mdmintz mdmintz released this 10 Sep 19:17
· 5025 commits to master since this release
5055312

Add expected methods

  • Add self.clear(SELECTOR)
  • Add self.set_text(SELECTOR, TEXT)
  • Update SeleniumBase translations
  • Also set the pymysql requirement to version 0.10.1

Reasoning for the duplicate methods:

  • Although most methods that type text already clear out the text field first, and although clearing out the text field can already be done with self.type(SELECTOR, ""), I'm adding the self.clear(SELECTOR) method to avoid confusion because developers will expect that method to exist.
  • Developers would also expect there to be a self.set_text(SELECTOR, TEXT) method (even though methods already exist that do the same thing) because there's a self.get_text(SELECTOR) method and a self.set_attribute(SELECTOR, ATTRIBUTE, VALUE) method, which sound similar.