LambdaTest / Robot-Selenium-Sample

Run test automation on cloud with Robot and LambdaTest. This is a sample repo to help you execute Robot framework based test scripts in parallel with LambdaTest automation testing cloud
https://www.lambdatest.com/
20 stars 30 forks source link

I can not run your script it is stuff on desired_capabilities due to wrong config #6

Closed thutran01 closed 1 year ago

thutran01 commented 2 years ago

Example of connecting to Lambdatest via Robot Framework | FAIL | Setup failed: WebDriverException: Message: You might be using selenium 4, please refer to capability generator https://www.lambdatest.com/capabilities-generator for selenium 4 capabilities or contact support please take a look on this or contact me for gmail ttthu.dsna@gmail.com i really need your help

vishnukdas commented 2 years ago

Hi @thutran01

Thanks for reporting this issue. You can make use of "LT:Options" when you are running tests on Selenium 4.

I am attaching a sample common.robot file with "LT:Options" that you can use in your project. Hope this helps!

*** Settings ***
Library  Selenium2Library
Library  LambdaTestStatus.py

*** Variables ***

${BROWSER}          ${ROBOT_BROWSER}
&{options}          browserName=${browserName}     platform=${platform}       version=${version}        visual=${visual}       network=${network}        console=${console}      name=RobotFramework Lambda Test
&{CAPABILITIES}     LT:Options=&{options}
${REMOTE_URL}       http://%{LT_USERNAME}:%{LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub
${TIMEOUT}          3000

*** Keywords ***

Open test browser
    [Timeout]   ${TIMEOUT}
    Open browser  https://lambdatest.github.io/sample-todo-app/  browser=${BROWSER}
    ...  remote_url=${REMOTE_URL}
    ...  desired_capabilities=${CAPABILITIES}

Close test browser
    Run keyword if  '${REMOTE_URL}' != ''
    ...  Report Lambdatest Status
    ...  ${TEST_NAME} 
    ...  ${TEST_STATUS} 
    Close all browsers