robot framework selenium 指定浏览器版本启动

来源:互联网 发布:飞鹰网络电视apk 编辑:程序博客网 时间:2024/06/04 23:57
*** Settings ***
Suite Setup       open browser    http://x.zhihuiya.com    ${BROWSER}    desired_capabilities=version:52.0.2    remote_url=http://192.168.146.129:4444/wd/hub
Suite Teardown    close browser
Library           Selenium2Library
Library           Collections




*** Variables ***
${BROWSER}        firefox


*** Test Cases ***
测试一下
    comment    input text   id=kw    中国人
    comment    click element    id=su
    comment    sleep    2
    comment    page should contain    中国人
    click element    //a[@class="subject-link"]
    sleep    4
    ${text}    get text    //a[@class="active haschild"]    #类名相同class active
    Run Keyword And Continue On Failure    should be equal    ${text}    专代考试
    sleep    4    #中文
原创粉丝点击