Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_label(self, locator)
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)的更多相关文章
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_labels(self, locator)
def get_selected_list_labels(self, locator): """Returns the visible labels of selecte ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)
def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)
def unselect_from_list_by_value(self, locator, *values): """Unselects `*values` from ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)
def unselect_from_list_by_index(self, locator, *indexes): """Unselects `*indexes` fro ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list(self, locator, *items)
def unselect_from_list(self, locator, *items): """Unselects given values from select ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)
def select_from_list_by_label(self, locator, *labels): """Selects `*labels` from list ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)
def select_from_list_by_value(self, locator, *values): """Selects `*values` from list ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list(self, locator, *items)
def select_from_list(self, locator, *items): """Selects `*items` from list identified ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)
def list_should_have_no_selections(self, locator): """Verifies select list identified ...
随机推荐
- struts2学习笔记(2)——简单的输入验证以及标签库的运用
struts2自带了一些标签库,运用好这些标签库会减少开发周期. 1.struts2标签库是在哪定义的? struts2标签库定义在struts2-core-2.1.8.jar这个文件中,具体在这个j ...
- Java学习笔记(二)UML基础
用例图:代表系统的一个功能模块,仅仅是系统功能的描述.用例图包括:用例.角色.角色和用例之间的关系以及系统内用例之间的关系. 类图:表示系统中包含哪些实体,各实体之间如何关联. 类图除了表示实体内部结 ...
- python自省指南
深入python中对自省的定义: python的众多强大功能之一,自省,正如你所知道的,python中万物皆对象,自省是指代码可以查看内存中以对象形式存在的其他模块和函数,获取它们的信息,并对它们进行 ...
- JAVA学习路线图---(JAVA1234)
第一阶段-Java基础 这一阶段很重要,关系到你后面阶段的学习,所以务必把这一阶段掌握好: 如果你是0基本,我推荐一本比较好的,适合初学者看的书:明日科技的<Java从入门到精通>,最 ...
- maven项目:Invalid bound statement
在使用maven做mybatis项目时会遇到这个问题, org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
- IntelliJ IDEA像Eclipse一样打开多个项目
原文:http://blog.csdn.net/zht666/article/details/47831893 我们做项目实际中经常会遇到这样的情况,创建一个common项目(Maven项目)作为公用 ...
- Android 学习(一)
这几天被一些功能折磨的要死了,于是放下了这个,看点其它的东西,算是转移一下焦点.床头放了不少书籍,也都被翻阅过,翻阅过,却不曾细细的品味过,俗话说,书可借而不可买也,这话用到自己的身上丝毫不错.因为是 ...
- html 表单笔记
表单 表单中主要包括下列元素: button——普通按钮radio ——单选按钮checkbox——复选框select ——下拉式菜单text ——单行文本框textarea——多行文本框s ...
- PHP开发经验总结
1.使用内嵌的HTML代码,而不是PHP的echo语句. 因为PHP是一门嵌入式Web编程语言,可以将HTML代码和PHP代码相互嵌入.但是很多程序员担心在HTML代码中过多的使用”"嵌入P ...
- AndroidApplication Fundamentals(Android应用基础)
AndroidApplication Fundamentals(Android应用基础) Android应用采用Java编程语言来编写,AndroidSDK工具编译我们的代码,连同任何数据和资源文件一 ...