本文整理匯總了Python中JDI.jdi_assert.testing.assertion.Assert類的典型用法代碼示例。如果您正苦於以下問題:Python Assert類的具體用法?Python Assert怎麽用?Python Assert使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Assert類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_focus
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)
示例2: check_action_throw_error
def check_action_throw_error(action, message):
try:
action()
except Exception as ex:
Assert.assert_contains(str(ex), message)
return
except:
d = 8
raise Exception("Exception not thrown")
示例3: test_get_options_as_text
def test_get_options_as_text(self):
Assert.assert_equal(self.dropdown.get_options_as_text(), "Colors, Red, Green, Blue, Yellow")
示例4: test_get_value
def test_get_value(self):
Assert.assert_equal(self.radio_buttons.get_value(), "1")
示例5: test_is_selected
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)
示例6: test_get_selected
def test_get_selected(self):
Assert.assert_equal(self.radio_buttons.get_selected(), "1")
示例7: test_get_options_as_text
def test_get_options_as_text(self):
Assert.assert_equal(self.radio_buttons.get_options_as_text(), ", ".join(self.odd_options))
示例8: test_fill
def test_fill():
W3cSite.frame_page.try_it_button.click()
Assert.assert_equal(W3cSite.frame_page.i_frame.label_button.get_text(), "Click Me!")
示例9: test_get_reference
def test_get_reference(self):
Assert.assert_equal(self.link.get_reference(), EpamJDISite.support_page.url)
示例10: check_action
def check_action(text, line_number=0):
Assert.assert_contains(EpamJDISite.actions_log.get_text_by_line(line_number), text)
示例11: test_get_value
def test_get_value(self):
Assert.assert_equal(self.dropdown.get_value(), "Colors")
示例12: test_is_selected_enum
def test_is_selected_enum(self):
Assert.assert_equal(self.dropdown.is_selected(Colors.COLORS), True)
示例13: test_is_selected
def test_is_selected(self):
Assert.assert_equal(self.dropdown.is_selected("Colors"), True)
示例14: test_get_selected
def test_get_selected(self):
Assert.assert_equal(self.dropdown.get_selected(), "Colors")
示例15: test_get_name
def test_get_name(self):
Assert.assert_equal(self.dropdown.get_name(), "color_dropdown")