def test_set_value_nothing_changes(self, input): self.check_box.click() self.check_box.set_value(input) CommonActionsData.check_action("Water: condition changed to true") self.check_box.click() self.check_box.set_value(input) CommonActionsData.check_action("Water: condition changed to false")
def test_check_all(self): self.check_list.check_all() CommonActionsData.check_action("Fire: condition changed to true", line_number=0) CommonActionsData.check_action("Wind: condition changed to true", line_number=1) CommonActionsData.check_action("Earth: condition changed to true", line_number=2) CommonActionsData.check_action("Water: condition changed to true", line_number=3) self.check_all_checked()
def test_set_value(self): self.dropdown.set_value("Blue") CommonActionsData.check_action("Colors: value changed to Blue")
def test_select_index(self): self.dropdown.select(4) CommonActionsData.check_action("Colors: value changed to Blue")
def test_select_enum(self): self.radio_buttons.select(Odds.SEVEN) CommonActionsData.check_action("Summary (Odd): value changed to 7")
def check_file_loaded(self, file_name): CommonActionsData.check_action( 'FileUpload: file "{0}" has been uploaded'.format(file_name)) Assert.assert_contains(self.uploaded_file_name.get_text(), file_name)
def test_select_index(self): self.combo_box.select(3) CommonActionsData.check_action("Metals: value changed to Silver")
def test_check(self, value): self.check_list.check(value) CommonActionsData.check_action("Fire: condition changed to true")
def test_check_2_index(self): self.check_list.check(1, 4) CommonActionsData.check_action("Fire: condition changed to true", line_number=0) CommonActionsData.check_action("Water: condition changed to true", line_number=1)
def test_check_2_enum(self): self.check_list.check(Nature.WATER, Nature.FIRE) CommonActionsData.check_action("Fire: condition changed to true", line_number=0) CommonActionsData.check_action("Water: condition changed to true", line_number=1)
def test_check_2_string(self): self.check_list.check("Water", "Fire") CommonActionsData.check_action("Fire: condition changed to true", line_number=0) CommonActionsData.check_action("Water: condition changed to true", line_number=1)
def test_set_value(self): self.check_list.set_value("Fire") CommonActionsData.check_action("Fire: condition changed to true")
def test_set_value(self, input, expected): if not expected: EpamJDISite.metals_colors_page.cb_water.click() EpamJDISite.metals_colors_page.cb_water.set_value(input) CommonActionsData.check_action("Water: condition changed to " + str(expected).lower())
def test_set_value_text(self): self.combo_box.set_value("Blue") CommonActionsData.loose_focus() CommonActionsData.check_action("Metals: value changed to Blue")
def test_select_enum(self): self.dropdown.select(Colors.BLUE) CommonActionsData.check_action("Colors: value changed to Blue")
def test_get_selected_index(self): CommonActionsData.check_action_throw_error(lambda: self.dropdown.get_selected_index(), CommonActionsData.no_elements_message())
def test_new_input_test(self): self.text_file.new_input(CommonActionsData.get_file_path()) self.check_file_loaded(CommonActionsData.get_file_name())
def test_select_string(self): self.combo_box.select("Gold") CommonActionsData.check_action("Metals: value changed to Gold")
def test_select_index(self): self.radio_buttons.select(4) CommonActionsData.check_action("Summary (Odd): value changed to 7")
def test_set_value_text(self): self.radio_buttons.set_value("7") CommonActionsData.check_action("Summary (Odd): value changed to 7")
def test_select_enum(self): self.combo_box.select(Metals.GOLD) CommonActionsData.check_action("Metals: value changed to Gold")
def test_uncheck_single(self): self.check_box.click() self.check_box.uncheck() CommonActionsData.check_action("Water: condition changed to false")
def test_get_selected_index(self): CommonActionsData.check_action_throw_error( lambda: self.dropdown.get_selected_index(), CommonActionsData.no_elements_message())
def test_click(self): self.check_box.click() CommonActionsData.check_action("Water: condition changed to true") self.check_box.click() CommonActionsData.check_action("Water: condition changed to false")
def test_multi_check(self): self.check_box.check() self.check_box.check() CommonActionsData.check_action("Water: condition changed to true")
def test_send_keys(self): self.text_file.send_keys(CommonActionsData.get_file_path()) self.check_file_loaded(CommonActionsData.get_file_name())