Exemplo n.º 1
0
 def test_set_value_nothing_changes(self, checkbox_setup, input_value):
     self.check_box.click()
     self.check_box.set_value(input_value)
     CommonActionsData.check_action(MSG_TRUE)
     self.check_box.click()
     self.check_box.set_value(input_value)
     CommonActionsData.check_action(MSG_FALSE)
Exemplo n.º 2
0
 def test_check_all(self, check_list_setup):
     self.check_list.check_all()
     CommonActionsData.check_action(FIRE_MSG, 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_MSG, line_number=3)
     self.check_all_checked()
Exemplo n.º 3
0
 def test_select_index(self, dropdown_setup):
     dropdown_setup.select(4)
     CommonActionsData.check_action(MSG)
Exemplo n.º 4
0
 def test_multi_check(self, checkbox_setup):
     self.check_box.check()
     self.check_box.check()
     CommonActionsData.check_action(MSG_TRUE)
Exemplo n.º 5
0
 def test_check_single(self, checkbox_setup):
     self.check_box.check()
     CommonActionsData.check_action(MSG_TRUE)
Exemplo n.º 6
0
 def test_set_value(checkbox_setup, input_value, expected):
     if not expected:
         EpamJDISite.metals_colors_page.cb_water.click()
     EpamJDISite.metals_colors_page.cb_water.set_value(input_value)
     CommonActionsData.check_action("Water: condition changed to " +
                                    str(expected).lower())
Exemplo n.º 7
0
 def test_new_input_test(self):
     self.text_file.new_input(CommonActionsData.get_file_path())
     self.check_file_loaded(CommonActionsData.get_file_name())
Exemplo n.º 8
0
 def test_check_2_index(self, check_list_setup):
     self.check_list.check(1, 4)
     CommonActionsData.check_action(FIRE_MSG, line_number=0)
     CommonActionsData.check_action(WATER_MSG, line_number=1)
Exemplo n.º 9
0
 def test_select_enum(self):
     self.combo_box.select(Metals.GOLD)
     CommonActionsData.check_action("Metals: value changed to Gold")
Exemplo n.º 10
0
 def test_select_index(self):
     self.combo_box.select(3)
     CommonActionsData.check_action("Metals: value changed to Silver")
Exemplo n.º 11
0
 def test_select_string(self):
     self.combo_box.select("Gold")
     CommonActionsData.check_action("Metals: value changed to Gold")
Exemplo n.º 12
0
 def test_get_selected_index(self, dropdown_setup):
     CommonActionsData.check_action_throw_error(
         lambda: dropdown_setup.get_selected_index(),
         CommonActionsData.no_elements_message())
Exemplo n.º 13
0
 def test_set_value(self, dropdown_setup):
     dropdown_setup.set_value("Blue")
     CommonActionsData.check_action(MSG)
Exemplo n.º 14
0
 def test_select_enum(self, dropdown_setup):
     dropdown_setup.select(Colors.BLUE)
     CommonActionsData.check_action(MSG)
Exemplo n.º 15
0
 def test_check(self, check_list_setup, value):
     self.check_list.check(value)
     CommonActionsData.check_action(FIRE_MSG)
Exemplo n.º 16
0
 def test_check_2_string(self, check_list_setup):
     self.check_list.check("Water", "Fire")
     CommonActionsData.check_action(FIRE_MSG, line_number=0)
     CommonActionsData.check_action(WATER_MSG, line_number=1)
Exemplo n.º 17
0
 def test_set_value_text(self):
     self.combo_box.set_value("Blue")
     CommonActionsData.loose_focus()
     CommonActionsData.check_action("Metals: value changed to Blue")
Exemplo n.º 18
0
 def test_check_2_enum(self, check_list_setup):
     self.check_list.check(Nature.WATER, Nature.FIRE)
     CommonActionsData.check_action(FIRE_MSG, line_number=0)
     CommonActionsData.check_action(WATER_MSG, line_number=1)
Exemplo n.º 19
0
 def test_get_selected_index(self):
     CommonActionsData.check_action_throw_error(
         lambda: self.combo_box.get_selected_index(),
         CommonActionsData.no_elements_message())
Exemplo n.º 20
0
 def test_send_keys(self):
     self.text_file.send_keys(CommonActionsData.get_file_path())
     self.check_file_loaded(CommonActionsData.get_file_name())
Exemplo n.º 21
0
 def test_select_string(self, selector_site, radio_buttons):
     radio_buttons.select("7")
     CommonActionsData.check_action(MSG)
Exemplo n.º 22
0
 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)
Exemplo n.º 23
0
 def test_select_index(self, selector_site, radio_buttons):
     radio_buttons.select(4)
     CommonActionsData.check_action(MSG)
Exemplo n.º 24
0
 def test_select_enum(self, selector_site, radio_buttons):
     radio_buttons.select(Odds.SEVEN)
     CommonActionsData.check_action(MSG)
Exemplo n.º 25
0
 def test_set_value_text(self, selector_site, radio_buttons):
     radio_buttons.set_value("7")
     CommonActionsData.check_action(MSG)
Exemplo n.º 26
0
 def test_multi_uncheck(self, checkbox_setup):
     self.check_box.click()
     self.check_box.uncheck()
     self.check_box.uncheck()
     CommonActionsData.check_action(MSG_FALSE)
Exemplo n.º 27
0
 def test_set_value(self, check_list_setup):
     self.check_list.set_value("Fire")
     CommonActionsData.check_action(FIRE_MSG)
Exemplo n.º 28
0
 def test_click(self, checkbox_setup):
     self.check_box.click()
     CommonActionsData.check_action(MSG_TRUE)
     self.check_box.click()
     CommonActionsData.check_action(MSG_FALSE)
Exemplo n.º 29
0
 def test_select_string(self, dropdown_setup):
     dropdown_setup.select("Blue")
     CommonActionsData.check_action(MSG)