Sha256: 4a9f4b3fd7031b7238b3d866a95f831298be640459afe6613618dd0125fa354e
Contents?: true
Size: 859 Bytes
Versions: 7
Compression:
Stored size: 859 Bytes
Contents
module TestCentricity class AppCheckBox < AppUIElement def initialize(name, parent, locator, context) super @type = :checkbox end def checked? obj = element object_not_found_exception(obj) obj.attribute('checked') == 'true' end # Set the check state of a checkbox object. # # @example # remember_me_checkbox.check # def check set_checkbox_state(true) end # Uncheck a checkbox object. # # @example # remember_me_checkbox.uncheck # def uncheck set_checkbox_state(false) end def set_checkbox_state(state) obj = element object_not_found_exception(obj) if state obj.click unless obj.attribute('checked') == 'true' else obj.click if obj.attribute('checked') == 'true' end end end end
Version data entries
7 entries across 7 versions & 1 rubygems