Using already opened Browser window in Robot framework

前端 未结 2 1609
星月不相逢
星月不相逢 2021-01-24 06:33

We are using Robot Framework for writing/automating acceptance test cases.

Every time i need to run the whole script to check the last lines of code of my script, That

2条回答
  •  别那么骄傲
    2021-01-24 07:04

    Here is a geckodriver example for Firefox (win)

    Start your Firefox with marionette enabled (standard port is 2828)

    "C:\Program Files\Mozilla Firefox\firefox.exe" --marionette
    

    Robot example script

    *** Settings ***
    Library           SeleniumLibrary
    
    *** Variables ***
    ${BROWSER}          Firefox
    ${GECKODRIVER EXE}  c:/MY_GECKODRIVER_PATH/geckodriver.exe
    ${GECKODRIVER LOG}  C:/MY_GECKODRIVER_LOG_PATH/log.txt
    
    *** Test Cases ***
    Firefox Browser Test
        Init Webdriver
        Go To   https://www.google.com
    
    *** Keywords ***
    Init Webdriver
        ${service_args}=     Create List    --connect-existing    --marionette-port=2828    --marionette-host=127.0.0.1
        Create Webdriver     ${BROWSER}        executable_path=${GECKODRIVER EXE}   service_args=${service_args}    service_log_path=${GECKODRIVER LOG}
    

提交回复
热议问题