robot test_headless_3.robot
*** Test Cases ***
Open Google in Headless Mode
${options}= Evaluate sys.modules[‘selenium.webdriver’].ChromeOptions() sys, selenium.webdriver
Call Method ${options} add_argument --headless
Call Method ${options} add_argument --no-sandbox
Call Method ${options} add_argument --disable-dev-shm-usage
Call Method ${options} add_argument --disable-gpu
Call Method ${options} add_argument binary_location=${CHROME_PATH}
${service}= Evaluate sys.modules[‘selenium.webdriver’].chrome.service.Service(${CHROME_DRIVER_PATH}) sys, selenium.webdriver
Open Browser ${URL} ${BROWSER} options=${options} service=${service}
Title Should Be Google
Close Browser
output and error :
Test Headless 3
Open Google in Headless Mode | FAIL |
Calling method ‘add_argument’ failed: TypeError: ArgOptions.add_argument() got an unexpected keyword argument ‘binary_location’
Test Headless 3 | FAIL |
1 test, 0 passed, 1 failed
Output: /home/rameshm/output.xml
Log: /home/rameshm/log.html
Report: /home/rameshm/report.html
I am facing this issue .
While running it in my local ubuntu machine, it is working. But while running it in the ubuntu VM machine, i am facing the above error
i am runnning this as a chrome headless but still this error keep occuring.
Does anybody faced this error before. if yes, please provide your support to resolve this issue.