def get_selected_list_label(self, locator):
"""Returns the visible label of the selected element from the select list identified by `locator`. Select list keywords work on both lists and combo boxes. Key attributes for
select lists are `id` and `name`. See `introduction` for details about
locating elements.
"""
select = self._get_select_list(locator)
return select.first_selected_option.text

方法名:get_selected_list_label(self, locator)

公共方法 返回首个选中项的label值

接收参数:locator

8行:使用_get_select_list(self, locator)方法根据传入的locator返回Select对象。

9行:返回首个选中项的label值

使用:

返回结果:

 INFO : ${label} = 无逾期

Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_label(self, locator)的更多相关文章

  1. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_labels(self, locator)

    def get_selected_list_labels(self, locator): """Returns the visible labels of selecte ...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

随机推荐

  1. lintcode 中等题: reverse linked list II 翻转链表II

    题目 翻转链表 II 翻转链表中第m个节点到第n个节点的部分 样例 给出链表1->2->3->4->5->null, m = 2 和n = 4,返回1->4-> ...

  2. *[codility]Country network

    https://codility.com/programmers/challenges/fluorum2014 http://www.51nod.com/onlineJudge/questionCod ...

  3. mysql级联删除更新

    首先,目前在产品环境可用的MySQL版本(指4.0.x和4.1.x)中,只有InnoDB引擎才允许使用外键,所以,我们的数据表必须使用InnoDB引擎. 下面,我们先创建以下测试用数据库表: CREA ...

  4. css元素z-index设置为什么不起作用?

    元素位置重叠的背景常识 (x)html文档中的元素默认处于普通流(normal flow)中,也就是说其顺序由元素在文档中的先后位置决定,此时一般不会产生重叠(但指定负边距可能产生重叠). 当我们用c ...

  5. OpenCV源码阅读(2)---matx.h---函数的内联实现

    外部矩阵计算函数 namespace internal { template<typename _Tp, int m> struct Matx_DetOp { double operato ...

  6. 卷积神经网络Convolutional Neural Networks

    Convolutional Neural Networks NOTE: This tutorial is intended for advanced users of TensorFlow and a ...

  7. C#Winfrom中,窗体加载时会自动执行一次控件的textchange事件,怎么让它不执行?

    http://zhidao.baidu.com/link?url=iTSyfa5_RJBSb37S8efdWoL5eDMrnxeAm-prhGSNBXqdP9r7PzNDQTc7gVzJgCNdzli ...

  8. Android之NDK编程(JNI)

    转自:http://www.cnblogs.com/xw022/archive/2011/08/18/2144621.html NDK编程入门--C回调JAVA方法   一.主要流程 1.  新建一个 ...

  9. 9本java程序员必读的书

    来源:http://mp.weixin.qq.com/s?__biz=MjM5NzA1MTcyMA==&mid=202904638&idx=2&sn=21dd20438e32a ...

  10. WINCE 开机自动弹USB连接窗口问题(已解决)

    平台:S3C6410+WinCE6.0 问题现像: 当启用UART0也就是COM1时,无论插没插USB线,一开机,它都会弹出个USB连接的窗口, 原因分析: 是因为在三星原版本BSP里的串口驱动上制定 ...