Selenium2Library系列keywords之_ElementKeywords

#公有方法:

(1)current_frame_contains(self, text, loglevel='INFO')

(2)current_frame_should_not_contain(self, text, loglevel='INFO')

(3)element_should_contain(self, locator, expected, message='')

(4)frame_should_contain(self, locator, text, loglevel='INFO')

(5)page_should_contain(self, text, loglevel='INFO')

(6)page_should_contain_element(self, locator, message='', loglevel='INFO')

(7)locator_should_match_x_times(self, locator, expected_locator_count, message='', loglevel='INFO')

(8)page_should_not_contain(self, text, loglevel='INFO')

(9)page_should_not_contain_element(self, locator, message='', loglevel='INFO')

(10)assign_id_to_element(self, locator, id)

(11)element_should_be_disabled(self, locator)

(12)element_should_be_enabled(self, locator)

(13)element_should_be_visible(self, locator, message='')

(14)element_should_not_be_visible(self, locator, message='')

(15)element_text_should_be(self, locator, expected, message='')

(16)get_element_attribute(self, attribute_locator)

(17)get_horizontal_position(self, locator)

(18)get_value(self, locator)

(19)get_text(self, locator)

(20)clear_element_text(self, locator)

(21)get_vertical_position(self, locator)

# Public, mouse input/events

(22)click_element(self, locator)

(23)click_element_at_coordinates(self, locator, xoffset, yoffset)

(24)double_click_element(self, locator)

(25)focus(self, locator)

(26)drag_and_drop(self, source, target)

(27)drag_and_drop_by_offset(self, source, xoffset, yoffset)

(28)mouse_down(self, locator)

(29)mouse_out(self, locator)

(30)mouse_over(self, locator)

(31)mouse_up(self, locator)

(32)open_context_menu(self, locator)

(33)simulate(self, locator, event)

(34)press_key(self, locator, key)

# Public, links

(35)click_link(self, locator)

(36)get_all_links(self)

(37)mouse_down_on_link(self, locator)

(38)page_should_contain_link(self, locator, message='', loglevel='INFO')

(39)page_should_not_contain_link(self, locator, message='', loglevel='INFO')

 # Public, images

(40)click_image(self, locator)

(41)mouse_down_on_image(self, locator)

(42)page_should_contain_image(self, locator, message='', loglevel='INFO')

(43)page_should_not_contain_image(self, locator, message='', loglevel='INFO')

(44)get_matching_xpath_count(self, xpath)

(45)xpath_should_match_x_times(self, xpath, expected_xpath_count, message='', loglevel='INFO')

# Private

(46)_element_find(self, locator, first_only, required, tag=None)

返回匹配上的首个元素

(47)_frame_contains(self, locator, text)

(48)_get_text(self, locator)

返回元素的text

(49)_get_value(self, locator, tag=None)

返回元素的value值

(50)_is_enabled(self, locator)

判断元素是否为激活状态

(51)_is_text_present(self, text)

(52)_is_visible(self, locator)

判断元素是否可见

(53)_map_ascii_key_code_to_key(self, key_code)

通过key_code返回对应的key

(54)_parse_attribute_locator(self, attribute_locator)

(55)_is_element_present(self, locator, tag=None)

返回元素是否存在

(56)_page_contains(self, text)

(57)_page_should_contain_element(self, locator, tag, message, loglevel)

(58)_page_should_not_contain_element(self, locator, tag, message, loglevel)

更多相关文章
一周排行
  • 最近公司CRM做了集群,为了解决服务器之间的Web文件同步,体验了一把cwSync,感觉还不错,把在网上找的一些用法和自己摸索的一些方法写下: rsync远程备份实测和总结归纳如下:1)拷贝本地文件:当本地和远程路径 ...
  • 好了.现在打开CCNA02这个吧 看一下本单的目标就主要是识别路由器,交换机之间的连接组件.看第4页,这是一个基本的网络结构. 第5页说的一些物理介质标准.比如说网络,5类,超5类,这些.第6页,就是一些那种线有效范 ...
  • [email protected]:/var/www/html# vim ./dictionaries/zh.dictionary.itop.ui.php 修改         //'UI:Button:Finish' =>  ...
  • Java版的WinRAR工具 最近做个东西,需要强大的Java版压缩组建支持,可惜没有开源的,最后实在没办法了.决定自己实现个,反正JDK中提供了最基础的API. 标题说WinRAR工具,夸大了,还没WinRAR那么 ...
  • 字符串串联运算符+,当给定一个String操作数和一个引用时,该运算符将通过调用被引用对象的toString方法(如果引用或toString的结果是一个空引用,则使用"null"),把引用转换成S ...
  • 收录下流程控制语句方便查看和使用:if 语法 if <表达式>:if expression :else:Statement(s)statement(s)如果在条件表达是成立执行IF下语句,不成立执行ELS ...
  • 工作笔记-Outlook Express dbx文件超过2G导致邮件丢失问题的处理 7 7 标签:outlookexpressdbx2G邮件丢失 [推送到技术圈] 版权声明:原创作品, ...
  • 1.动态创建表结构,引入com中的二个动态库,一个是ADOX,一个是ADODB二个dll,ADOX.dll和Interop.ADODB.dll2.增加wfm中的按钮,按钮事件如下:其中的m_path是当前程序运行的路 ...
  • 火锅尝后感,桌面虚拟化服务真的很重要
    周二晚上终于要和几个一直未曾谋面的网友接上头了!接头的地点——我们找了一家离大家都相对比较 ...
  • 在开始介绍NHibernate和Spirng.Net之前,有必要先介绍一下相对应的两个Java开源框架Hibernate和Spring.它们是在Java的Web应用开发中已经很成熟的框架,而前者则是两个还不成熟的.N ...