目录地址:https://blog.csdn.net/qupan1993/article/details/87513905

1、下面列出常用的API

转载自博客园 :https://www.cnblogs.com/wangdecheng/p/10880316.html

Selenium2Library用户关键字
*** Settings ***
Library           Selenium2Library*** Keywords ***
Checkbox应该不被选择[Arguments]    ${locator}Checkbox Should Not Be Selected    ${locator}Frame应该包含文本[Arguments]    ${locator}    ${text}    ${loglevel}=INFOFrame Should Contain    ${locator}    ${text}    ${loglevel}List应该无选项[Arguments]    ${locator}List Should Have No Selections    ${locator}List选项应该是[Arguments]    ${locator}    @{items}List Selection Should Be    ${locator}    @{items}Radio按钮不应该被选择[Arguments]    ${group_name}Radio Button Should Not Be Selected    ${group_name}Radio按钮应该被设置成[Arguments]    ${group_name}    ${value}Radio Button Should Be Set To    ${group_name}    ${value}Url应该包含[Arguments]    ${expected}Location Should Contain    ${expected}Xpath应该匹配X次[Arguments]    ${xpath}    ${expected_xpath_count}    ${msg}=    ${loglevel}=INFOXpath Should Match X Times    ${xpath}    ${expected_xpath_count}    ${msg}    ${loglevel}checkbox应该被选择[Arguments]    ${locator}checkbox should be selected    ${locator}url应该是[Arguments]    ${url}Location Should Be    ${url}下次确认选择取消Choose Cancel On Next Confirmation下次确认选择确定Choose Ok On Next Confirmation从List中取消选项[Arguments]    ${locator}    @{items}Unselect From List    ${locator}    @{items}从List选择选项[Arguments]    ${locator}    @{items}Select From List    ${locator}    @{items}偏移拖拽[Arguments]    ${source}    ${xoffset}    ${yoffset}Drag And Drop By Offset    ${source}    ${xoffset}    ${yoffset}元素应该不包含文本[Arguments]    ${locator}    ${expected}    ${msg}=Element Should Not Contain    ${locator}    ${expected}    ${msg}元素应该不可用[Arguments]    ${locator}Element Should Be Disabled    ${locator}元素应该不可见[Arguments]    ${locator}    ${msg}=Element Should Not Be Visible    ${locator}    ${msg}元素应该包含文本[Arguments]    ${locator}    ${text}Element Should Contain    ${locator}    ${text}元素应该匹配x次[Arguments]    ${locator}    ${count}    ${msg}=    ${loglevel}=INFOLocator Should Match X Times    ${locator}    ${count}    ${msg}    ${loglevel}元素应该可用[Arguments]    ${locator}Element Should Be Enabled    ${locator}元素应该可见[Arguments]    ${locator}Element Should Be Visible    ${locator}元素文本应该是[Arguments]    ${locator}    ${expected}    ${msg}=Element Text Should Be    ${locator}    ${expected}    ${msg}全选List元素[Arguments]    ${locator}Select All From List    ${locator}关闭所有浏览器Close All Browsers关闭浏览器Close Browser关闭窗口Close Window切换浏览器[Arguments]    ${index}Switch Browser    ${index}创建Webdriver[Arguments]    ${driver_name}    ${alias}=    ${kwargs}={}Create Webdriver    ${driver_name}    ${alias}    ${kwargs}删除Cookie[Arguments]    ${name}Delete Cookie    ${name}删除所有CookieDelete All Cookies删除本地策略[Arguments]    ${strategy_name}Remove Location Strategy    ${strategy_name}刷新页面Reload Page双击元素[Arguments]    ${locator}Double Click Element    ${locator}取消选择Checkbox[Arguments]    ${locator}Unselect Checkbox    ${locator}取消选择FrameUnselect Frame回退Go Back在图片上按下鼠标左键[Arguments]    ${locator}Mouse Down On Image    ${locator}在连接上按下鼠标左键[Arguments]    ${locator}Mouse Down On Link    ${locator}应该出现警告弹窗[Arguments]    ${text}=Alert Should Be Present    ${text}当前Frame不应该包含[Arguments]    ${text}    ${loglvl}=INFOCurrent Frame Should Not Contain    ${text}    ${loglvl}当前Frame包含[Arguments]    ${text}    ${loglevel}=INFOCurrent Frame Contains    ${text}    ${loglevel}截屏[Arguments]    @{filename}Capture Page Screenshot    @{filename}打开浏览器[Arguments]    ${url}    ${browser}=chrome    @{args}Open Browser    ${url}    ${browser}    @{args}打开菜单[Arguments]    ${locator}Open Context Menu    ${locator}执行js[Arguments]    ${code}Execute Javascript    ${code}执行异步js[Arguments]    ${code}Execute Async Javascript    ${code}拖拽元素[Arguments]    ${source}    ${target}Drag And Drop    ${source}    ${target}按下鼠标左键[Arguments]    ${locator}Mouse Down    ${locator}按键[Arguments]    ${locator}    ${key}[Documentation]    按键 \ \ text_field \ \ q......    按键 \ \ login_button \ \\13 \ \ #ASCII Code for enter KeyPress Key    ${locator}    ${key}提交表单[Arguments]    ${locator}=Submit Form    ${locator}文本区值应该是[Arguments]    ${locator}    ${expected}    ${msg}=Textarea Value Should Be    ${locator}    ${expected}    ${msg}文本区应该包含[Arguments]    ${locator}    ${expected}    ${msg}=Textarea Should Contain    ${locator}    ${expected}    ${msg}文本框值应该是[Arguments]    ${locator}    ${expected}    ${msg}=Textfield Value Should Be    ${locator}    ${expected}    ${msg}文本框应该包含[Arguments]    ${locator}    ${expected}    ${msg}=Textfield Should Contain    ${locator}    ${expected}    ${msg}最大化Maximize Browser Window标题应该是[Arguments]    ${title}Title Should Be    ${title}根据Index从List中取消选项[Arguments]    ${locator}    @{indexes}Unselect From List By Index    ${locator}    @{indexes}根据Index从List选择[Arguments]    ${locator}    @{indexes}Select From List By Index    ${locator}    @{indexes}根据Label从List中取消选项[Arguments]    ${locator}    @{Labels}Unselect From List By Label    ${locator}    @{Labels}根据Label从List选择[Arguments]    ${locator}    @{labels}Select From List By Label    ${locator}    @{labels}根据Value从List中取消选项[Arguments]    ${locator}    @{values}Unselect From List By Value    ${locator}    @{values}根据Value从List选择[Arguments]    ${locator}    @{values}Select From List By Value    ${locator}    @{values}根据值选择列表元素[Arguments]    ${locator}    ${value}Select From List By Value    ${locator}    ${value}模拟[Arguments]    ${locator}    ${event}Simulate    ${locator}    ${event}注册失败后运行的关键字[Arguments]    ${kwd}Register Keyword To Run On Failure    ${kwd}添加cookie[Arguments]    ${name}    ${value}    ${path}=    ${domain}=    ${secure}=    ${expiry}=添加本地策略[Arguments]    ${strategy_name}    ${strategy_keyword}    ${persist}=FalseAdd Location Strategy    ${strategy_name}    ${strategy_keyword}    ${persist}清除元素文本[Arguments]    ${locator}Clear Element Text    ${locator}点击元素[Arguments]    ${path}Click Element    ${path}点击元素坐标[Arguments]    ${locator}    ${xoffset}    ${yoffset}Click Element At Coordinates    ${locator}    ${xoffset}    ${yoffset}点击图片[Arguments]    ${locator}Click Image    ${locator}点击按钮[Arguments]    ${path}Click Button    ${path}点击链接[Arguments]    ${locator}Click Link    ${locator}睡眠[Arguments]    ${time}Sleep    ${time}确认Confirm Action窗口列表@{list}    List Windows[Return]    @{list}等待元素不包含文本[Arguments]    ${locator}    ${text}    ${timeout}=    ${error}=Wait Until Element Does Not Contain    ${locator}    ${text}    ${timeout}    ${error}等待元素不可见[Arguments]    ${locator}    ${timeout}=    ${error}=Wait Until Element Is Not Visible    ${locator}    ${timeout}    ${error}等待元素包含文本[Arguments]    ${locator}    ${text}    ${timeout}=    ${error}=Wait Until Element Contains    ${locator}    ${text}    ${timeout}    ${error}等待元素可用[Arguments]    ${locator}    ${timeout}=    ${error}=Wait Until Element Is Enabled    ${locator}    ${timeout}    ${error}等待元素可见[Arguments]    ${locator}    ${timeout}=30Wait Until Element Is Visible    ${locator}    ${timeout}等待执行成功[Arguments]    ${timeout}    ${retry}    ${keyword}    @{args}Wait Until Keyword Succeeds    ${timeout} minutes    ${retry} sec    ${keyword}    @{args}等待条件成立[Arguments]    ${condition}    ${timeout}=    ${error}=Wait For Condition    ${condition}    ${timeout}    ${error}等待页面不包含元素[Arguments]    ${locator}    ${timeout}=    ${error}=Wait Until Page Does Not Contain Element    ${locator}    ${timeout}    ${error}等待页面包含元素[Arguments]    ${locator}    ${timeout}=    ${error}=Wait Until Page Contains Element    ${locator}    ${timeout}    ${error}等待页面包含文本[Arguments]    ${text}    ${timeout}=    ${error}=Wait Until Page Contains    ${text}    ${timeout}    ${error}给元素分配ID[Arguments]    ${locator}    ${id}Assign Id To Element    ${locator}    ${id}获取Cookie值[Arguments]    ${name}${value}    Get Cookie Value    ${name}[Return]    ${value}获取List元素[Arguments]    ${locator}@{items}    Get List Items    ${locator}获取List多个选定值[Arguments]    ${locator}@{values}    Get Selected List Values    ${locator}[Return]    @{values}获取List多个选定标签[Arguments]    ${locator}@{labels}    Get Selected List Labels    ${locator}[Return]    @{labels}获取List选定值[Arguments]    ${locator}${value}    Get Selected List Value    ${locator}[Return]    ${value}获取List选定标签[Arguments]    ${locator}${label}    Get Selected List Label    ${locator}[Return]    ${label}获取Selenium等待时间${sec}    Get Selenium Implicit Wait[Return]    ${sec}获取Selenium超时${timeout}    Get Selenium Timeout[Return]    ${timeout}获取Selenium速率${res}    Get Selenium Speed[Return]    ${res}获取xpath匹配次数[Arguments]    ${xpath}${count}    Get Matching Xpath Count    ${xpath}[Return]    ${count}获取元素值[Arguments]    ${locator}${value}    Get Value    ${locator}[Return]    ${value}获取元素属性[Arguments]    ${attribute_locator}Get Element Attribute    ${attribute_locator}获取元素文本[Arguments]    ${locator}${text}    Get Text    ${locator}[Return]    ${text}获取坐标${location}    Get Location[Return]    ${location}获取垂直坐标[Arguments]    ${locator}${vertical}    Get Vertical Position    ${locator}[Return]    ${vertical}获取当前Url${url}    Log Location[Return]    ${url}获取当前页面标题${title}    Log Title[Return]    ${title}获取所有Cookie@{cookies}    Get Cookies[Return]    @{cookies}获取所有连接@{links}    Get All Links[Return]    @{links}获取文本[Arguments]    ${path}${text}    get text    ${path}[Return]    ${text}获取标题${title}    get title[Return]    ${title}获取水平坐标[Arguments]    ${locator}@{position}    Get Horizontal Position    ${locator}[Return]    @{position}获取焦点[Arguments]    ${locator}Focus    ${locator}获取窗口名字@{names}    Get Window Names[Return]    @{names}获取窗口坐标${x}    ${y}=    Get Window Position[Return]    ${x}    ${y}获取窗口大小${width}    ${higth}=    GET Window Size[Return]    ${width}    ${higth}获取窗口标识@{windows}    Get Window Identifiers[Return]    @{windows}获取窗口标题@{titles}    Get Window Titles[Return]    @{titles}获取表格内容[Arguments]    ${table_locator}    ${row}    ${column}    ${loglevel}=INFO${cell}    Get Table Cell    ${table_locator}    ${row}    ${column}    ${loglevel}[Return]    ${cell}获取警告信息${msg}    Get Alert Message[Return]    ${msg}获取资源${source}    Get Source[Return]    ${source}获取页面元素[Arguments]    ${locator}@{elements}    Get Webelements    ${locator}[Return]    @{elements}获取页面标题${title}    Get Title[Return]    ${title}获取页面资源[Arguments]    ${loglevel}=INFO${source}    Log Source    ${loglevel}[Return]    ${source}表头应该包含[Arguments]    ${table_locator}    ${expected}    ${loglevel}=INFOtable header should contain    ${table_locator}    ${expected}    ${loglevel}表头应该包含文本[Arguments]    ${table_locator}    ${expected}    ${loglevel}=INFOTable Header Should Contain    ${table_locator}    ${expected}    ${loglevel}表应该包含文本[Arguments]    ${table_locator}    ${expected}    ${loglevel}=INFOTable Should Contain    ${table_locator}    ${expected}    ${loglevel}表格Footer应该包含文本[Arguments]    ${table_locator}    ${expected}    ${loglevel}Table Footer Should Contain    ${table_locator}    ${expected}    ${loglevel}表格列应该包含文本[Arguments]    ${table_locator}    ${col}    ${expected}    ${loglevel}=INFOTable Column Should Contain    ${table_locator}    ${col}    ${expected}    ${loglevel}表格应该包含[Arguments]    ${table_locator}    ${row}    ${column}    ${expected}table cell should contain    ${table_locator}    ${row}    ${column}    ${expected}表格应该包含文本[Arguments]    ${table_locator}    ${row}    ${column}    ${expected}    ${loglevel}=INFOTable Cell Should Contain    ${table_locator}    ${row}    ${column}    ${expected}    ${loglevel}表格行应该包含文本[Arguments]    ${table_locator}    ${row}    ${expected}    ${loglvl}=INFOTable Row Should Contain    ${table_locator}    ${row}    ${expected}    ${loglvl}设置Selenium等待[Arguments]    ${seconds}${return}    Set Selenium Implicit Wait    ${seconds}[Return]    ${return}设置Selenium超时[Arguments]    ${seconds}Set Selenium Timeout    ${seconds}设置Selenium速率[Arguments]    ${speed}Set Selenium Speed    ${speed} seconds设置浏览器等待时间[Arguments]    ${seconds}Set Browser Implicit Wait    ${seconds}设置窗口坐标[Arguments]    ${x}    ${y}Set Window Position    ${x}    ${y}设置窗口大小[Arguments]    ${width}    ${higth}Set Window Size    ${width}    ${higth}跳转[Arguments]    ${url}Go To    ${url}跳转到[Arguments]    ${url}go to    ${url}输入密码[Arguments]    ${path}    ${passwd}Input password    ${path}    ${passwd}输入文本[Arguments]    ${path}    ${str}Input Text    ${path}    ${str}选择Checkbox[Arguments]    ${locator}Select Checkbox    ${locator}选择Frame[Arguments]    ${locator}Select Frame    ${locator}选择Radio按钮[Arguments]    ${group_name}    ${value}Select Radio Button    ${group_name}    ${value}选择文件[Arguments]    ${locator}    ${file_path}Choose File    ${locator}    ${file_path}选择窗口[Arguments]    ${locator}=Select Window    ${locator}页面应该不包含Checkbox[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Checkbox    ${locator}    ${msg}    ${loglevel}页面应该不包含Link[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Link    ${locator}    ${msg}    ${loglevel}页面应该不包含List[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain List    ${locator}    ${msg}    ${loglevel}页面应该不包含Radio按钮[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Radio Button    ${locator}    ${msg}    ${loglevel}页面应该不包含元素[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Element    ${locator}    ${msg}    ${loglevel}页面应该不包含图片[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Image    ${locator}    ${msg}    ${loglevel}页面应该不包含按钮[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Button    ${locator}    ${msg}    ${loglevel}页面应该不包含文本[Arguments]    ${text}    ${lvl}=INFOPage Should Not Contain    ${text}    ${lvl}页面应该不包含文本框[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Not Contain Textfield    ${locator}    ${msg}    ${loglevel}页面应该包含Checkbox[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Checkbox    ${locator}    ${msg}    ${loglevel}页面应该包含Link[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Link    ${locator}    ${msg}    ${loglevel}页面应该包含List[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain List    ${locator}    ${msg}    ${loglevel}页面应该包含Radio按钮[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Radio Button    ${locator}    ${msg}    ${loglevel}页面应该包含元素[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Element    ${locator}    ${msg}    ${loglevel}页面应该包含图片[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Image    ${locator}    ${msg}    ${loglevel}页面应该包含按钮[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Button    ${locator}    ${msg}    ${loglevel}页面应该包含文本[Arguments]    ${text}    ${loglevel}=INFOPage Should Contain    ${text}    ${loglevel}页面应该包含文本框[Arguments]    ${locator}    ${msg}=    ${loglevel}=INFOPage Should Contain Textfield    ${locator}    ${msg}    ${loglevel}鼠标悬停[Arguments]    ${locator}Mouse Over    ${locator}鼠标移出[Arguments]    ${locator}Mouse Out    ${locator}鼠标释放[Arguments]    ${locator}

Robotframework(三)常用API介绍相关推荐

  1. tinymce系列(三) tinymce 常用API介绍

    文章目录 tinymce 常用 API 介绍 引入模块 注册插件 获取编辑器传入的参数 事件监听与派发 tinymce 内置请求 动态添加资源 获取和操作 dom 节点 和 操作 html 获取光标选 ...

  2. JDK8新特性简介、Lambda表达式、Stream流常用api介绍

    JDK8新特性简介.Lambda表达式.Stream流常用api介绍 接口 Java1.8前接口中是不允许有普通方法的,在Java1.8后允许接口中有普通方法,只需要加上default关键字即可: J ...

  3. 【Elasticsearch】elasticsearch 常用 API 介绍

    文章目录 1.概述 1.1 通用参数 2. cat查看API 3. 集群API 3.1 集群健康 3.2 分片恢复状态 3.3 节点列表信息 3.4 Index Level 索引层面健康 3.5 Sh ...

  4. 【java】简述CGLIB常用API

    1.概述 转载:简述CGLIB常用API 类似:[Spring]CGLIB动态代理 CGLIB,即Code Generation Library,是一个强大的.高性能的代码生成库.其被广泛应用于AOP ...

  5. J2SEI:常用API(String,Math)

    什么是API? API(Application Programming,应用程序编程接口)是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件的以访问一组例程的能力,而又无需访问源码,或 ...

  6. Unity脚本介绍和常用API

    Unity脚本介绍和常用API 脚本介绍 1.脚本 介绍 语法结构 编译过程 2.开发工具 MonoDevelop Visual Studio 3.脚本生命周期 简介 脚本生命周期的阶段 1.初始阶段 ...

  7. etl常用的三种工具介绍_Adobe Photoshop常用修图插件+屏幕模式+内容感知移动工具介绍...

    PS教学第27期 第一篇 1.5 Photoshop的三种屏幕模式 [Ps教程] 1. 本节课将为您演示,系统的三种屏幕显示模式.首先依次点击[文件 > 打开]命令,打开一张示例图片. imag ...

  8. Hbase API中常用类介绍和使用

    网上Hbase的介绍有很多,案例也不少.自己写了个Demo,进行一些简单的总结. HBase 常用类介绍. JAVA API 和 HBase数据库模型之间的关系 JAVA 类 Hbase 数据模型 H ...

  9. C# 淘宝商品微信返利助手开发-(三)返利助手开发(1)API介绍

    系列教程一目录:返利助手原理 系列教程二目录:返利助手开放文档以及帐号申请地址 系列教程三目录:返利助手开发(1)API介绍 系列教程四目录:返利助手开发(2)淘宝分享的内容如何只取淘口令 系列教程五 ...

  10. 【小程序开发必备】微信小程序常用API全介绍,附示例代码和使用场景

    文章目录 1.网络请求相关API 1.1 wx.request 1.2 wx.uploadFile 1.3 wx.downloadFile 1.4 wx.connectSocket 2.页面跳转相关A ...

最新文章

  1. postgresql(pg)数据库简介
  2. Py之albumentations:albumentations库函数的简介、安装、使用方法之详细攻略
  3. ESP8266的MQTT客户端搭建教程(基于NONS_SDK_v2.0)
  4. 教你一步步发布一个开源库到 JCenter
  5. mysql修改主机名_Ubuntu修改主机名
  6. Mongodb 自动增长 自增id 实现
  7. 【SPFA】重建道路(jzoj 1212)
  8. Prolog学习笔记100805
  9. 如何快速安装kafka-manager
  10. Mysql优化(出自官方文档) - 第九篇(优化数据库结构篇)
  11. 冒泡排序C语言(从小到大)
  12. USB转RJ45串口调试线(console线)
  13. C++程序加速的12个方法
  14. C语言程序中数字字符是什么,C语言中如何识别字符与数字
  15. 小区宽带网络不稳定,宽带断线重连的几种方法(详细)
  16. Vue学习笔记02——Vue路由
  17. [学习]BES蓝牙芯片开发
  18. 【论文翻译】The Quantum Internet: Networking Challenges in Distributed Quantum Computing
  19. 艾永亮:为什么企业都在追求超级产品,超级产品的意义是什么?
  20. HTML5炫酷的特效代码下载

热门文章

  1. 扒一扒使用boostrap-fileinput上传插件遇到的坑,Bootstrap-fileinput上传插件的使用详解
  2. [iOS]仿微博视频边下边播之封装播放器
  3. 麻将判断胡牌 java_麻将基本胡的算法——Java
  4. 怎么安装光盘并重新启动计算机,如何用光盘重新安装电脑系统
  5. 初识云计算————虚拟化背景
  6. 像素是计算机图像处理的最小单元,图像处理复习
  7. Matlab:i 和j其实是MATLAB内置函数(built-in function)
  8. HCE技术在城市一卡通中的应用探讨
  9. 【java】this()与super()使用详解
  10. win10 将中文名修改成英文名