本文整理匯總了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)