美文网首页
RobotFramework安装

RobotFramework安装

作者: 清水秋香 | 来源:发表于2020-03-25 16:51 被阅读0次

    安装 如下 RF使用中需要的工具和库

    1. RF
      在Python中安装 robotframework
    #执行命令 
    pip install robotframework 
    
    1. seleniumlibrary
      在Python中安装 seleniumlibrary
    #执行命令  
    pip install --upgrade robotframework-seleniumlibrary 
    

    3.pycharm安装插件

    在Pycharm中,点击菜单 file - settings - plugins
    在弹出对话框中 点击下方 按键 Browse Repository
    在新对话框中, 搜索栏里面输入 robot

    安装 下面1个插件

    IntelliBot @SeleniumLibrary Patched

    下载 IntelliBot插件,百度网盘下载地址:
    链接:https://pan.baidu.com/s/1nrcDBArfkX6WQmzjc6RUFw
    密码:sub9

    在Pycharm中,点击菜单 file - settings - plugins
    在弹出对话框中 点击下方 按键install plugin from disk
    选择下载的jar文件

    将如下 自动化用例 拷贝到 一个 名为 xxx.robot的文件中,然后用 robot命令行 运行一下

    *** Settings ***
    Library  SeleniumLibrary
    *** Test Cases ***
    用例1
        #用例主体部分令起一行
        log to console  hello robot
    用例2
        Open Browser  http://www.baidu.com  chrome
        set selenium implicit wait  10
        input text  id=kw    苍井空\n
        ${res}   get text  xpath=//*[@id='1']//em
        should contain    ${res}  苍井空
        close Browser
    

    相关文章

      网友评论

          本文标题:RobotFramework安装

          本文链接:https://www.haomeiwen.com/subject/kerxuhtx.html