robot framework selenium 指定瀏覽器版本啟動
阿新 • • 發佈:2019-01-03
*** 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 #中文
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 #中文