zoukankan      html  css  js  c++  java
  • robotframework+python3+selenium之web相关关键字---第二集

    1.F5可查看所有关键字,如图:

    2.浏览器相关关键字:

    2.1  Open Browser    https://www.baidu.com  chrome    # 打开浏览器,rf默认使用火狐浏览器,所以如果不指定浏览器,则默认使用火狐,我们可以指定浏览器为chrome,操作更快

    2.2  Close Browser        # 关闭浏览器

    2.3  Close All Browser    # 关闭所有浏览器并重置缓存

    2.4  Maximize Browser Window        # 最大化

    2.5  Set Browser Implicit Wait      xxs    # 通过selenium 设置implicit_wait  xxs是指几秒的意思

    2.6  Switch Browser                         # 通过索引或别名切换浏览器

    2.7  Element Shold Be Visible           # 定位查找的元素可见

    2.8  Get Window Idetifiers        # 返回当前所有浏览器的id属性

    2.9  Get Window Names           # 返回当前所有浏览器的name属性,多用于打开的浏览器,判断对错,切换浏览器页面等操作

    2.10  Get Window Titles             # 返回当前所有浏览器的title

    2.11  Get Window Handles         #返回当前所有浏览器句柄

    2.12  Select Window                 # 选择浏览器窗口

    2.13  Select Frame                   #切换frame操作

    3.鼠标相关关键字

    3.1  Mouse Down                            # 模拟按下鼠标左键

    3.2   Mouse Down On Image           # 模拟在定位图片上按下鼠标左键

    3.3   Mouse Down On Link               # 模拟在定位链接上按下鼠标左键

    3.4   Mouse Out                               # 模拟鼠标移出

    3.5   Mouse Over                            # 模拟鼠标悬停

    4. 文本操作关键字

    4.1  Input Text                        # 输入文本

    4.2  Get Text                          # 获取文本

    4.3  Element Text Should Be            # 预期包含文本值

    4.4  Element Text Should Not Be        # 预期不包含文本值

    4.5  Clear Element Text                        # 清空文本内容

    4.6  Click Link                                        # 点击连接

    4.7  Press Key                                       # 按压键 [ locator | key]

    4.8  Click element                                # 点击

    4.9  Click image                                #点击image

    4.10   get value                                # 获取值

    4.11  Get horizontal position            # 获取当前对象的左上角顶点距离整个页面的横坐标

    4.12  Get vertical positon               # 获取纵坐标

    4.13  select checkbox                  # 勾选复选框

    4.14  unselect checkbox           # 不勾选复选框

    4.15  select radio button          # 选择radio 按钮

    4.16  choose file                     # 选择文件

    4.17  input password             # 输入密码

    4.18  click button                 # 点击按钮

    4.19  select from list  by index/value/label             # 通过index/value/label选择from表单

    4.20  select all form list                 # 选中所有的表单

    4.21  get list items                      # 获取所有的列表项

    4.22  get selected list label/value     # 确认一下选中的列表项

    4.23  get table cell                            # 获取指定table里的指定行列的元素的文本值

    24. get index in table column/row          # 获取某个文本在表格的行列

    25. execute JavaScript                       # 运行js

    26. execute async JavaScript            # 异步执行js脚本

    27. confirm action                            # 对话框确认

    28. capture page screenshot            # 当前页面截图

    29. wait for condition                       # 等待条件

    30. wait until page contains

    31. wait until page contains element

    32. Wait Until keyword Succeeds

    33. wait until page

  • 相关阅读:
    【BZOJ-4422】Cow Confinement 线段树 + 扫描线 + 差分 (优化DP)
    【BZOJ-2521】最小生成树 最小割
    mtools使用-1
    关于nodejs DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
    学习RUNOOB.COM进度二
    学习RUNOOB.COM进度一
    深入了解jQuery Mobile-3装载器
    深入了解jQuery Mobile-1
    mongodb的学习之旅一
    支付回调内容
  • 原文地址:https://www.cnblogs.com/daphnezhu/p/12095418.html
Copyright © 2011-2022 走看看