Esempio n. 1
0
 def test_set_attribute(self):
     attribute_name = "testAttr"
     value = "testValue"
     self.clickable_item.set_attribute(attribute_name, value)
     Assert.assert_equal(
         self.clickable_item.get_element().get_attribute(attribute_name),
         value)
Esempio n. 2
0
 def test_add_cookie(self):
     cookie = {'name': 'key', 'value': 'value'}
     self.get_driver().delete_all_cookies()
     Assert.is_true(not len(self.get_driver().get_cookies()))
     EpamJDISite.contact_form_page.add_cookie(cookie)
     Assert.assert_equal(
         self.get_driver().get_cookie(cookie["name"])["value"],
         cookie["value"])
Esempio n. 3
0
 def test_focus(self):
     value = "value"
     attribute_name = "focusTest"
     self.text_field.set_attribute(attribute_name, value)
     self.text_field.focus()
     driver = JDISettings.get_driver_factory().get_driver()
     result_value = driver._switch_to.active_element.get_attribute(attribute_name)
     Assert.assert_equal(value, result_value)
Esempio n. 4
0
 def test_focus(self):
     value = "value"
     attribute_name = "focusTest"
     self.text_field.set_attribute(attribute_name, value)
     self.text_field.focus()
     driver = JDISettings.get_driver_factory().get_driver()
     result_value = driver._switch_to.active_element.get_attribute(attribute_name)
     Assert.assert_equal(value, result_value)
Esempio n. 5
0
 def test_refresh(self):
     EpamJDISite.contact_form_page.contact_form.submit.click()
     Assert.assert_equal(EpamJDISite.contact_form_page.result.get_text(),
                         "Summary: 3")
     EpamJDISite.contact_form_page.refresh()
     Assert.assert_equal(EpamJDISite.contact_form_page.result.get_text(),
                         "")
     EpamJDISite.contact_form_page.check_opened()
Esempio n. 6
0
 def test_column_by_criteria_name(self):
     actual_column = "".join(
         list(
             map(
                 lambda x: "{0}:{1} ".format(str(x[0]), x[1].get_text()),
                 self.table.column("TestNG, JUnit, Custom", Row.row("3")),
             )))
     Assert.assert_equal(actual_column, self.expected_column)
Esempio n. 7
0
 def test_row_by_criteria_int(self):
     actual_column = "".join(
         list(
             map(
                 lambda x: "{0}:{1} ".format(str(x[0]), x[1].get_text()),
                 self.table.row("MSTest, NUnit, Epam", Column.column(3)),
             )))
     Assert.assert_equal(actual_column, self.expected_row)
Esempio n. 8
0
 def test_get_selected(self):
     Assert.assert_equal(self.dropdown.get_selected(), "Colors")
Esempio n. 9
0
 def test_is_selected_enum(self):
     Assert.assert_equal(self.dropdown.is_selected(Colors.COLORS), True)
Esempio n. 10
0
 def test_get_value(self):
     Assert.assert_equal(self.radio_buttons.get_value(), "1")
Esempio n. 11
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.dropdown.get_options_as_text(),
                         "Colors, Red, Green, Blue, Yellow")
Esempio n. 12
0
 def test_get_values(self):
     Assert.assert_equal(self.dropdown.get_values(), self.odd_options)
Esempio n. 13
0
 def test_set_attribute(self):
     attribute_name = "testAttr"
     value = "testValue"
     self.text_item.set_attribute(attribute_name, value)
     Assert.assert_equal(self.text_item.get_web_element().get_attribute(attribute_name), value)
Esempio n. 14
0
 def test_get_value(self):
     Assert.assert_equal(self.dropdown.get_value(), "Colors")
Esempio n. 15
0
 def test_get_values(self):
     Assert.assert_equal(self.check_list.get_values(), self.nature_options)
Esempio n. 16
0
 def test_is_selected(self):
     Assert.assert_equal(self.dropdown.is_selected("Colors"), True)
Esempio n. 17
0
 def test_is_selected_enum(self):
     Assert.assert_equal(self.dropdown.is_selected(Colors.COLORS), True)
Esempio n. 18
0
 def test_get_selected(self):
     Assert.assert_equal(self.dropdown.get_selected(), "Colors")
Esempio n. 19
0
 def test_get_name(self):
     Assert.assert_equal(self.dropdown.get_name(), "color_dropdown")
Esempio n. 20
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.dropdown.get_options_as_text(), "Colors, Red, Green, Blue, Yellow")
Esempio n. 21
0
 def test_get_reference(self):
     Assert.assert_equal(self.link.get_reference(), EpamJDISite.support_page.url)
Esempio n. 22
0
 def test_are_selected(self):
     Assert.assert_equal(self.check_list.are_selected(), [])
Esempio n. 23
0
 def test_get_value(self):
     Assert.assert_equal(self.check_list.get_value(), None)
Esempio n. 24
0
 def test_get_selected_index(self):
     Assert.assert_equal(self.radio_buttons.get_selected_index(), 0)
Esempio n. 25
0
 def test_get_name(self):
     Assert.assert_equal(self.check_list.get_name(), "nature_check_list")
Esempio n. 26
0
 def test_get_values(self):
     Assert.assert_equal(self.check_list.get_values(), self.nature_options)
Esempio n. 27
0
 def test_get_name(self):
     Assert.assert_equal(self.radio_buttons.get_name(),"odds_radio_buttons")
Esempio n. 28
0
 def test_input(self):
     self.text_field.input(self.input_text)
     Assert.assert_equal(self.text_field.get_text(), self.initial_text+self.input_text)
Esempio n. 29
0
 def test_is_selected_enum(self):
     Assert.assert_equal(self.radio_buttons.is_selected(Odds.SEVEN), False)
     Assert.assert_equal(self.radio_buttons.is_selected(Odds.ONE), True)
Esempio n. 30
0
 def test_send_key(self):
     self.text_field.send_keys(self.input_text)
     Assert.assert_equal(self.text_field.get_text(), self.initial_text+self.input_text)
Esempio n. 31
0
 def test_is_selected_enum(self):
     Assert.assert_equal(self.radio_buttons.is_selected(Odds.SEVEN), False)
     Assert.assert_equal(self.radio_buttons.is_selected(Odds.ONE), True)
Esempio n. 32
0
 def test_new_input(self):
     self.text_field.new_input(self.input_text)
     Assert.assert_equal(self.text_field.get_text(), self.input_text)
Esempio n. 33
0
 def test_get_values(self):
     Assert.assert_equal(self.dropdown.get_values(), self.odd_options)
Esempio n. 34
0
 def test_clear(self):
     self.text_field.clear()
     Assert.assert_equal(self.text_field.get_text(), "")
Esempio n. 35
0
 def test_get_name(self):
     Assert.assert_equal(self.dropdown.get_name(), "color_dropdown")
Esempio n. 36
0
 def test_multi_key(self):
     for letter in self.input_text:
         self.text_field.send_keys(letter)
     Assert.assert_equal(self.text_field.get_text(), self.initial_text+self.input_text)
Esempio n. 37
0
 def test_is_selected(self):
     Assert.assert_equal(self.dropdown.is_selected("Colors"), True)
Esempio n. 38
0
 def test_add_new_line(self):
     new_line = "newLine"
     self.text_item.send_keys("garbageString")
     self.text_item.add_new_line(new_line)
     lines = self.text_item.get_lines()
     Assert.assert_equal(new_line, lines[1])
Esempio n. 39
0
 def test_get_value(self):
     Assert.assert_equal(self.dropdown.get_value(), "Colors")
Esempio n. 40
0
 def test_fill():
     W3cSite.frame_page.try_it_button.click()
     Assert.assert_equal(W3cSite.frame_page.i_frame.label_button.get_text(), "Click Me!")
Esempio n. 41
0
 def test_input_line(self):
     self.text_item.input_lines(self.LINES)
     lines = self.text_item.get_lines()
     Assert.assert_equal(lines, self.LINES)
Esempio n. 42
0
 def test_are_deselected(self):
     Assert.assert_equal(self.check_list.are_deselected(), self.nature_options)
Esempio n. 43
0
 def test_get_lines(self):
     self.text_item.send_keys(self.LINES[0] + "\n" + self.LINES[1] + "\n" +
                              self.LINES[2])
     Assert.assert_equal(self.text_item.get_lines(), self.LINES)
Esempio n. 44
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.check_list.get_options_as_text(), self.all_values)
Esempio n. 45
0
 def test_submit_spec_button_string(self):
     self.form.submit_form(self.contact, "calculate")
     Assert.assert_equal(EpamJDISite.contact_form_page.result.get_text(), "Summary: 3")
Esempio n. 46
0
 def test_are_deselected(self):
     Assert.assert_equal(self.check_list.are_deselected(),
                         self.nature_options)
Esempio n. 47
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.check_list.get_options_as_text(),
                         self.all_values)
Esempio n. 48
0
 def test_get_values(self):
     Assert.assert_equal(self.radio_buttons.get_values(), self.odd_options)
Esempio n. 49
0
 def test_are_selected(self):
     Assert.assert_equal(self.check_list.are_selected(), [])
Esempio n. 50
0
 def test_get_name(self):
     Assert.assert_equal(self.check_list.get_name(), "nature_check_list")
Esempio n. 51
0
 def test_get_value(self):
     Assert.assert_equal(self.check_list.get_value(), None)
Esempio n. 52
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.radio_buttons.get_options_as_text(),
                         ", ".join(self.odd_options))
Esempio n. 53
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.radio_buttons.get_options_as_text(), ", ".join(self.odd_options))
Esempio n. 54
0
 def test_get_name(self):
     Assert.assert_equal(self.radio_buttons.get_name(), "odds_selector")
Esempio n. 55
0
 def test_get_selected(self):
     Assert.assert_equal(self.radio_buttons.get_selected(), "1")
Esempio n. 56
0
 def test_get_selected(self):
     Assert.assert_equal(self.radio_buttons.get_selected(), "1")
Esempio n. 57
0
 def test_is_selected(self):
     Assert.assert_equal(self.radio_buttons.is_selected("7"), False)
     Assert.assert_equal(self.radio_buttons.is_selected("1"), True)
Esempio n. 58
0
 def test_get_selected_index(self):
     Assert.assert_equal(self.radio_buttons.get_selected_index(), 0)
Esempio n. 59
0
 def test_get_value(self):
     Assert.assert_equal(self.radio_buttons.get_value(), "1")
Esempio n. 60
0
 def test_is_selected(self):
     Assert.assert_equal(self.radio_buttons.is_selected("7"), False)
     Assert.assert_equal(self.radio_buttons.is_selected("1"), True)