Docker+Selenium Grid構建分布式Web測試環境(3)

發表于:2017-03-16來源:簡書作者:wywincl點擊數: 標簽:Dockerselenium
/opt/bin/entry_point 24 minutes ago Up 24 minutes 0.0 .0 .0 : 5901 - 5900 /tcp elegant_dijkstrada8c2598666f selenium/hub /opt/bin/entry_point 9 days ago Up 51 minutes 0.0 .0 .0 : 32768 - 4444 /tcp sel
"/opt/bin/entry_point" 24 minutes ago Up 24 minutes 0.0.0.0:5901->5900/tcp elegant_dijkstra da8c2598666f selenium/hub "/opt/bin/entry_point" 9 days ago Up 51 minutes 0.0.0.0:32768->4444/tcp selenium-hub

運行一個基本的測試用例demo.robot,如下所示, 我們的用例是用Robot Framework編寫的,具體編寫方法請參考Robot Framework測試框架

*** Setting ***
Library    Selenium2Library

*** Variables ***
${HOST}    https://www.baidu.com

*** Test Cases ***
T_Case_1
    Log    Open Browser
    Open Browser    ${HOST}    firefox    remote_url=http://0.0.0.0:32768/wd/hub
    Input Text    id=kw    Robot Framework
    Click Button    id=su
    Capture Page Screenshot
    Sleep    5s
    Close Browser

*** Keywords ***

執行測試用例

原文轉自:http://www.jianshu.com/p/52e711918d0c

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97