# 公有方法

(1)get_list_items(self, locator)  返回labels集合

_get_select_list_options(self, select_list_or_locator)   返回select, select.options

 _get_labels_for_options(self, options)  返回labels集合

(2)get_selected_list_label(self, locator)  返回首个选中项的label

  _get_select_list(self, locator)  返回Select 类型元素

(3)get_selected_list_labels(self, locator) 返回所有选中项的labels集合

self._get_select_list_options_selected(locator)  返回select, select.all_selected_options

_get_labels_for_options(self, options) 返回labels集合

(4)get_selected_list_value(self, locator) 返回首个选中项的value属性值

_get_select_list(self, locator)  返回Select 类型元素

(5)get_selected_list_values(self, locator)  返回所有选中项的values集合

self._get_select_list_options_selected(locator)  返回select, select.all_selected_options

self._get_values_for_options(options) 返回values集合

(6)list_selection_should_be(self, locator, *items) 验证options应该为选中状态

self.page_should_contain_list(locator)

self._get_select_list_options_selected(locator)

self._get_values_for_options(options)

self._get_labels_for_options(options)

(7)list_should_have_no_selections(self, locator)  验证select没有选中项

self._get_select_list_options_selected(locator)

self._get_labels_for_options(options)

(8)page_should_contain_list(self, locator, message='', loglevel='INFO')  验证select存在当前页面

self._page_should_contain_element(locator, 'list', message, loglevel)

(9) page_should_not_contain_list(self, locator, message='', loglevel='INFO')  验证select不存在当前页面

self._page_should_not_contain_element(locator, 'list', message, loglevel)

(10)select_all_from_list(self, locator) 选中multi-select的所有选项

self._get_select_list(locator)

select.select_by_index(i)

(11)select_from_list(self, locator, *items)  根据所给的values/labels 选择项

self._get_select_list(locator)

select.select_by_index(i)

select.select_by_value(item)

select.select_by_visible_text(item)

(12)select_from_list_by_index(self, locator, *indexes)  根据indexes选择项

self._get_select_list(locator)

(13)select_from_list_by_value(self, locator, *values)  根据values选择项

self._get_select_list(locator)

(14)select_from_list_by_label(self, locator, *labels) 根据labels选择项

self._get_select_list(locator)

(15)unselect_from_list(self, locator, *items)  根据values/labels不选择项

self._get_select_list(locator)

self._get_select_list_options(select)

(16)unselect_from_list_by_index(self, locator, *indexes) 根据indexes不选择项

self._get_select_list(locator)

(17)unselect_from_list_by_value(self, locator, *values) 根据values不选择项

self._get_select_list(locator)

(18)unselect_from_list_by_label(self, locator, *labels) 根据labels不选择项

self._get_select_list(locator)

#私有方法

(1)_get_labels_for_options(self, options) 返回options的labels集合

(2)_get_select_list(self, locator) 返回Select类型元素

self._element_find(locator, True, True, 'select')

(3)_get_select_list_options(self, select_list_or_locator) 返回select, select.options

self._get_select_list(select_list_or_locator)

(4) _get_select_list_options_selected(self, locator)  返回select, select.all_selected_options

self._get_select_list(locator)

(5)_get_values_for_options(self, options) 返回options的values集合

(6)_is_multiselect_list(self, select) 验证Select 元素是否为multiselect

(7)_unselect_all_options_from_multi_select_list(self, select)  不选中所有项

(8)_unselect_option_from_multi_select_list(self, select, options, index)  不选中指定optoin

Selenium2Library系列 keywords 之 _SelectElementKeywords的更多相关文章

  1. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)

    def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...

  2. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)

    def unselect_from_list_by_value(self, locator, *values): """Unselects `*values` from ...

  3. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)

    def unselect_from_list_by_index(self, locator, *indexes): """Unselects `*indexes` fro ...

  4. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list(self, locator, *items)

    def unselect_from_list(self, locator, *items): """Unselects given values from select ...

  5. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)

    def select_from_list_by_label(self, locator, *labels): """Selects `*labels` from list ...

  6. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)

    def select_from_list_by_value(self, locator, *values): """Selects `*values` from list ...

  7. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list(self, locator, *items)

    def select_from_list(self, locator, *items): """Selects `*items` from list identified ...

  8. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)

    def list_should_have_no_selections(self, locator): """Verifies select list identified ...

  9. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_selection_should_be(self, locator, *items)

    def list_selection_should_be(self, locator, *items): """Verifies the selection of sel ...

  10. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)

    def get_selected_list_values(self, locator): """Returns the values of selected elemen ...

随机推荐

  1. 很赞的MathJax

    一直想在网页上放进LaTeX布局,但由于是要发布在SAE上,因此有很多的限制. 然后在这儿发现了这个好东东,MathJax,非常方便,JS直接可以外链. 通过它,我编辑了这个页面,看起来很不错哦.

  2. stanford-postagger中文词性标注

    安装 系统需要安装Java1.6+ http://nlp.stanford.edu/software/tagger.shtml 下载Download full Stanford Tagger vers ...

  3. 从WeUI学习到的知识点

    WeUI是微信Web服务开发的UI套件, 目前包含12个模块 (Button, Cell, Toast, Dialog, Progress, Msg, Article, ActionSheet, Ic ...

  4. 大规模视觉识别挑战赛ILSVRC2015各团队结果和方法 Large Scale Visual Recognition Challenge 2015

    Large Scale Visual Recognition Challenge 2015 (ILSVRC2015) Legend: Yellow background = winner in thi ...

  5. flex 4 transition

    <s:transitions> <s:Transition fromState="default"> <s:Parallel> <mx:R ...

  6. 在cmd中登录ftp服务器

    http://jingyan.baidu.com/article/0bc808fc8778ee1bd485b93b.html C:\Users\Administrator>ftpftp> ...

  7. android测试常用的命令介绍

  8. mongodb unset/set 删除/增加字段

    删除全部文档的name字段 db.users.update({},{$unset: {"name":""}},{nulti:true}) 增加全部文档的name ...

  9. 《OD大数据实战》Hive入门实例

    官方参考文档:https://cwiki.apache.org/confluence/display/Hive/LanguageManual 一.命令行和客户端 1. 命令窗口 1)进入命令窗口 hi ...

  10. Android微信SDK API 调用教程1

    最近一直在调用微信的API,却发现一直调用不成功,纠结了好久,各方面找教程,找官方,官方里的文档也只是写得很模糊,说是按三步走. 1.申请App_ID 2.填写包名3. 获取程序签名的md5值, 这三 ...