Closed vmsoriano closed 1 year ago
@vmsoriano maybe it will help? https://github.com/mcdcorp/opentest/issues/604#issuecomment-1504874522
don't work for me, i think its a problem with bot detection, homepage return blank but in browser the page show correctly.
I need to configure selenium stealth, but i dont know how introduce this parameters in actor.yaml
options.add_experimental_option("excludeSwitches", ["enable-automation"]) options.add_experimental_option('useAutomationExtension', False)
@adrianth can you correct me
@vmsoriano
if i correct understood you are need add chromeExperimentalOptions
to your actor: (syntax maybe incorrect, i doesnt know how correct convert yaml to java Map)
chromeDriverExePath: /usr/bin/chromedriver
chromeDriverExeArgs: [headless, start-maximized, disable-extensions, disable-dev-shm-usage, no-sandbox]
chromeExperimentalOptions: {"excludeSwitches": "enable-automation", "useAutomationExtension": False}
or like this maybe:
chromeDriverExePath: /usr/bin/chromedriver
chromeDriverExeArgs: [headless, start-maximized, disable-extensions, disable-dev-shm-usage, no-sandbox]
chromeExperimentalOptions:
excludeSwitches: enable-automation
useAutomationExtension: False
link to source code: https://github.com/mcdcorp/opentest/blob/0aa4a9d288d4ecef4183f4fafe59fb95da7ae967/actor/selenium/src/main/java/org/getopentest/selenium/core/SeleniumHelper.java#L85-L89
source code screenshot:
I try it, but when i type a list on actor.yaml
Caused by: org.openqa.selenium.InvalidArgumentException: invalid argument: entry 0 of 'firstMatch' is invalid
from invalid argument: cannot parse capability: goog:chromeOptions
from invalid argument: cannot parse excludeSwitches
from invalid argument: must be a list
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'ecrlpa06', ip: '10.31.134.24', os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.0-425.19.2.el8_7.x86_64', java.version: '11.0.19'
And my config file
# Selenium options
selenium:
# seleniumServerUrl: http://127.0.0.1:9515
desiredCapabilities:
browserName: chrome
chromeOptions:
chromeDriverExePath: /usr/bin/chromedriver
chromeDriverExeArgs: [headless, start-maximized, enable-javascript, disable-extensions, disable-dev-shm-usage, no-sandbox]
chromeExperimentalOptions:
excludeSwitches: enable-automation
useAutomationExtension: False
resolution: 1920x1080
edgeDriverExePath:
I think i solve the problem but i only update chromedriver to version 113
Thanks all
OpenTest version number: 1.4.1
If I try to set up a web test against a website written in Angular, the test works perfectly, however if I do the same against a website that contains a javascript application, I only get a blank screen and the page doesn't load.
Selenium options:
Selenium options
selenium:
seleniumServerUrl: http://127.0.0.1:9515