本文整理汇总了Python中unit.ewslib_testcase.LIB._get_button_by_name方法的典型用法代码示例。如果您正苦于以下问题:Python LIB._get_button_by_name方法的具体用法?Python LIB._get_button_by_name怎么用?Python LIB._get_button_by_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unit.ewslib_testcase.LIB
的用法示例。
在下文中一共展示了LIB._get_button_by_name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_find_button_by_index
# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_button_by_name [as 别名]
def test_find_button_by_index(self):
self.navigate(data.PD_URL)
btn = LIB._get_button_by_name(button_name="Save",index=0)
self.assertEquals("Save", btn.text)
self.assertEquals("my_fake_button", btn.get_attribute("id"))
btn = LIB._get_button_by_name(button_name="Save",index=1)
self.assertEquals("Save", btn.text)
self.assertEquals("centerRoundedButton test_button", btn.get_attribute("class"))
示例2: test_find_button_by_name_inside_of_a_widget
# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_button_by_name [as 别名]
def test_find_button_by_name_inside_of_a_widget(self):
self.navigate(data.PD_URL)
expected_button_names= ["Save", "Cancel"]
for name in expected_button_names:
my_button = LIB._get_button_by_name(name,'Personal Data')
self.assertEquals(name, my_button.text)
示例3: test_find_button_by_name_no_widget_finds_button_outside_of_widget
# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_button_by_name [as 别名]
def test_find_button_by_name_no_widget_finds_button_outside_of_widget(self):
self.navigate(data.PD_URL)
btn = LIB._get_button_by_name(button_name="Save")
self.assertEquals("Save", btn.text)
self.assertEquals("my_fake_button", btn.get_attribute("id"))
示例4: test_find_button_by_name_no_widget
# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_button_by_name [as 别名]
def test_find_button_by_name_no_widget(self):
self.navigate(data.LOGIN_URL)
self.assertEquals("Login", LIB._get_button_by_name("Login").text)