def clear_categories(self): """Sets all category checkboxes to unchecked""" for device in self.selenium.find_elements( *self._categories_locator): device_type_checkbox = CheckBox(self.testsetup, device) if device_type_checkbox.state == True: device_type_checkbox.change_state()
def select_categories(self, name, state): """Set the value of a single category checkbox. Arguments: name -- the name of the checkbox to set state -- the state to leave the checkbox in """ for category in self.selenium.find_elements(*self._categories_locator): category_checkbox = CheckBox(self.testsetup, category) if category_checkbox.name == name: if category_checkbox.state != state: category_checkbox.change_state()
def select_device_type(self, name, state): """Set the value of a single device type checkbox. Arguments: name -- the name of the checkbox to set state -- the state to leave the checkbox in """ for device in self.selenium.find_elements(*self._device_type_locator): device_type_checkbox = CheckBox(self.testsetup, device) if device_type_checkbox.name == name: if device_type_checkbox.state != state: device_type_checkbox.change_state()
def select_device_type(self, name, state): """Set the value of a single device type checkbox. Arguments: name -- the name of the checkbox to set state -- the state to leave the checkbox in """ for device in self.selenium.find_elements( *self._device_type_locator): device_type_checkbox = CheckBox(self.testsetup, device) if device_type_checkbox.name == name: if device_type_checkbox.state != state: device_type_checkbox.change_state()
def clear_categories(self): """Sets all category checkboxes to unchecked""" for device in self.selenium.find_elements(*self._categories_locator): device_type_checkbox = CheckBox(self.testsetup, device) if device_type_checkbox.state == True: device_type_checkbox.change_state()