Skip to content

2.0.0b6

Compare
Choose a tag to compare
@yashaka yashaka released this 31 Aug 20:03
· 323 commits to master since this release

Opera & Edge for shared.browser, click_by_js and decorating hook for all waits to log commands

  • NEW: added "opera" and "edge" support for shared browser

    • example:

      from selene.support.shared import browser
      
      # browser.config.browser_name = 'opera'
      browser.config.browser_name = 'edge'
  • NEW: added config._wait_decorator

    • decorating Wait#for_ method
      • that is used when performing any element command
        and assertion (i.e. should)
      • hence, can be used to log corresponding commands with waits
        and integrate with something like allure reporting;)
    • prefixed with underscore, indicating that method is experimental,
      and can be e.g. renamed, etc.
    • see example at examples/log_all_selene_commands_with_wait.py
  • NEW: added config.click_by_js #420

    • for usage like in:

      from selene.support.shared import browser
      
      # browser.config.click_by_js = True
      # '''
      # if we would want to make all selene clicks to work via JS
      # as part of some CRAZY workaround, or maybe to make tester faster o_O :p
      # (it was a joke, nothing will be much faster :D with click via js)
      # '''
      
      button = browser.element('#btn').with_(click_by_js=True)
      '''
      to make all clicks for element('#btn') to work via js
      as part of some workaround ;)
      '''
      
      button.click()
      ...
      button.click()