webdriver_test_tools.webdriver.actions.form module

Helper functions for interacting with forms

Note

As of version 3.0, the methods in this module for filling/retrieving form values have been removed. Use FormObject instead.

webdriver_test_tools.webdriver.actions.form.toggle_checkbox(driver, checkbox_element)[source]

Helper method for toggling checkboxes that may or may not be visible

If checkbox is visible, just click that element. If it’s invisible for styling reasons, try to find the corresponding label and click that

Parameters
  • driver – Selenium webdriver object

  • checkbox_element – WebElement for the checkbox to toggle

Returns

True if the checkbox is checked after toggling, False if unchecked