当前位置: 首页>>代码示例>>Python>>正文


Python LIB._get_via_dummy_class方法代码示例

本文整理汇总了Python中unit.ewslib_testcase.LIB._get_via_dummy_class方法的典型用法代码示例。如果您正苦于以下问题:Python LIB._get_via_dummy_class方法的具体用法?Python LIB._get_via_dummy_class怎么用?Python LIB._get_via_dummy_class使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unit.ewslib_testcase.LIB的用法示例。


在下文中一共展示了LIB._get_via_dummy_class方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: verify_elements_in_widget

# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_via_dummy_class [as 别名]
 def verify_elements_in_widget(self, widget_name,dummy_class,expected_link_names,expected_ids):
     links = LIB._get_via_dummy_class(dummy_class, widget_name=widget_name)
     #verify link names
     link_names = [link.text for link in links]
     self.assertItemsEqual(expected_link_names, link_names)
     #verify link IDs
     link_ids = [link.get_attribute('id') for link in links]
     self.assertItemsEqual(expected_ids, link_ids)
开发者ID:,项目名称:,代码行数:10,代码来源:

示例2: test_get_elements_via_dummy_class_with_no_widget_still_finds_elements_inside_widget

# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_via_dummy_class [as 别名]
 def test_get_elements_via_dummy_class_with_no_widget_still_finds_elements_inside_widget(self):
     self.navigate(data.PD_URL)
     labels = LIB._get_via_dummy_class(DC.Label)
     #list of labels that don't implmenet the for_ ID pattern to identify the associated control
     #print "\n".join([lbl.text for lbl in labels if not lbl.get_attribute("id").startswith("for_")])
     self.assertEquals(39, len(labels))
     #ensure we find stuff like Title, Last name, first name that are in the Personal Data widget
     from sets import Set
     expected_Label_Names=Set(["Title","Last name","First name"])
     actual_Label_Names =Set([lbl.text for lbl in labels])
     self.assertTrue(expected_Label_Names.issubset(actual_Label_Names))
开发者ID:,项目名称:,代码行数:13,代码来源:

示例3: verify_elements_in_widget_by_attribute

# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_via_dummy_class [as 别名]
 def verify_elements_in_widget_by_attribute(self, widget_name,dummy_class,attrib,expected_vals):
     elements = LIB._get_via_dummy_class(dummy_class, widget_name=widget_name)
     #verify attribute
     attribs = [elem.get_attribute(attrib) for elem in elements]
     self.assertItemsEqual(expected_vals, attribs)
开发者ID:,项目名称:,代码行数:7,代码来源:

示例4: test_get_label_via_dummy_class_no_widget

# 需要导入模块: from unit.ewslib_testcase import LIB [as 别名]
# 或者: from unit.ewslib_testcase.LIB import _get_via_dummy_class [as 别名]
 def test_get_label_via_dummy_class_no_widget(self):
     self.navigate(data.LOGIN_URL)
     expected_labels=("User", "Password")
     labels = LIB._get_via_dummy_class(DC.Label)
     actual_labels = [lb.text for lb in labels]
     self.assertItemsEqual(expected_labels,actual_labels)
开发者ID:,项目名称:,代码行数:8,代码来源:


注:本文中的unit.ewslib_testcase.LIB._get_via_dummy_class方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。