Beispiel #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)
Beispiel #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"])
 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)
Beispiel #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)
Beispiel #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()
Beispiel #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)
Beispiel #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)
Beispiel #8
0
 def test_get_selected(self):
     Assert.assert_equal(self.dropdown.get_selected(), "Colors")
Beispiel #9
0
 def test_is_selected_enum(self):
     Assert.assert_equal(self.dropdown.is_selected(Colors.COLORS), True)
Beispiel #10
0
 def test_get_value(self):
     Assert.assert_equal(self.radio_buttons.get_value(), "1")
Beispiel #11
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.dropdown.get_options_as_text(),
                         "Colors, Red, Green, Blue, Yellow")
 def test_get_values(self):
     Assert.assert_equal(self.dropdown.get_values(), self.odd_options)
Beispiel #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)
 def test_get_value(self):
     Assert.assert_equal(self.dropdown.get_value(), "Colors")
Beispiel #15
0
 def test_get_values(self):
     Assert.assert_equal(self.check_list.get_values(), self.nature_options)
 def test_is_selected(self):
     Assert.assert_equal(self.dropdown.is_selected("Colors"), True)
 def test_is_selected_enum(self):
     Assert.assert_equal(self.dropdown.is_selected(Colors.COLORS), True)
 def test_get_selected(self):
     Assert.assert_equal(self.dropdown.get_selected(), "Colors")
 def test_get_name(self):
     Assert.assert_equal(self.dropdown.get_name(), "color_dropdown")
 def test_get_options_as_text(self):
     Assert.assert_equal(self.dropdown.get_options_as_text(), "Colors, Red, Green, Blue, Yellow")
Beispiel #21
0
 def test_get_reference(self):
     Assert.assert_equal(self.link.get_reference(), EpamJDISite.support_page.url)
Beispiel #22
0
 def test_are_selected(self):
     Assert.assert_equal(self.check_list.are_selected(), [])
Beispiel #23
0
 def test_get_value(self):
     Assert.assert_equal(self.check_list.get_value(), None)
Beispiel #24
0
 def test_get_selected_index(self):
     Assert.assert_equal(self.radio_buttons.get_selected_index(), 0)
Beispiel #25
0
 def test_get_name(self):
     Assert.assert_equal(self.check_list.get_name(), "nature_check_list")
Beispiel #26
0
 def test_get_values(self):
     Assert.assert_equal(self.check_list.get_values(), self.nature_options)
Beispiel #27
0
 def test_get_name(self):
     Assert.assert_equal(self.radio_buttons.get_name(),"odds_radio_buttons")
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #33
0
 def test_get_values(self):
     Assert.assert_equal(self.dropdown.get_values(), self.odd_options)
Beispiel #34
0
 def test_clear(self):
     self.text_field.clear()
     Assert.assert_equal(self.text_field.get_text(), "")
Beispiel #35
0
 def test_get_name(self):
     Assert.assert_equal(self.dropdown.get_name(), "color_dropdown")
Beispiel #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)
Beispiel #37
0
 def test_is_selected(self):
     Assert.assert_equal(self.dropdown.is_selected("Colors"), True)
Beispiel #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])
Beispiel #39
0
 def test_get_value(self):
     Assert.assert_equal(self.dropdown.get_value(), "Colors")
Beispiel #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!")
Beispiel #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)
Beispiel #42
0
 def test_are_deselected(self):
     Assert.assert_equal(self.check_list.are_deselected(), self.nature_options)
Beispiel #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)
Beispiel #44
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.check_list.get_options_as_text(), self.all_values)
 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")
Beispiel #46
0
 def test_are_deselected(self):
     Assert.assert_equal(self.check_list.are_deselected(),
                         self.nature_options)
Beispiel #47
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.check_list.get_options_as_text(),
                         self.all_values)
Beispiel #48
0
 def test_get_values(self):
     Assert.assert_equal(self.radio_buttons.get_values(), self.odd_options)
Beispiel #49
0
 def test_are_selected(self):
     Assert.assert_equal(self.check_list.are_selected(), [])
Beispiel #50
0
 def test_get_name(self):
     Assert.assert_equal(self.check_list.get_name(), "nature_check_list")
Beispiel #51
0
 def test_get_value(self):
     Assert.assert_equal(self.check_list.get_value(), None)
Beispiel #52
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.radio_buttons.get_options_as_text(),
                         ", ".join(self.odd_options))
Beispiel #53
0
 def test_get_options_as_text(self):
     Assert.assert_equal(self.radio_buttons.get_options_as_text(), ", ".join(self.odd_options))
Beispiel #54
0
 def test_get_name(self):
     Assert.assert_equal(self.radio_buttons.get_name(), "odds_selector")
Beispiel #55
0
 def test_get_selected(self):
     Assert.assert_equal(self.radio_buttons.get_selected(), "1")
Beispiel #56
0
 def test_get_selected(self):
     Assert.assert_equal(self.radio_buttons.get_selected(), "1")
Beispiel #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)
Beispiel #58
0
 def test_get_selected_index(self):
     Assert.assert_equal(self.radio_buttons.get_selected_index(), 0)
Beispiel #59
0
 def test_get_value(self):
     Assert.assert_equal(self.radio_buttons.get_value(), "1")
Beispiel #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)