Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not run test on remote machine #1891

Closed
Logivan-Nhut opened this issue Dec 9, 2019 · 0 comments
Closed

Can not run test on remote machine #1891

Logivan-Nhut opened this issue Dec 9, 2019 · 0 comments

Comments

@Logivan-Nhut
Copy link

I want to run a simple test that remote on a local docker container:

docker ps -a
CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS              PORTS                                            NAMES
e559bc98ae9c        selenium/standalone-chrome-debug:latest   "/opt/bin/entry_poin…"   10 seconds ago      Up 6 seconds        0.0.0.0:4444->4444/tcp, 0.0.0.0:5900->5900/tcp   new_selenium

I can run it successfully with selenium config: driverWeb = new RemoteWebDriver(new URL(url), chromeBrowserCapabilities();

But when I try to let Serenity control the webdriver life cycle, have an error:

Dec 06, 2019 5:31:15 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
[main] INFO net.thucydides.core.steps.ConsoleLoggingListener - STEP ERROR: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
F[main] INFO net.thucydides.core.steps.ConsoleLoggingListener - STEP ERROR: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'a77e0051b738', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_222'
Driver info: driver.version: unknown
remote stacktrace: #0 0x55d7b005a7e9 <unknown>

This is serenity.conf:

webdriver {
  driver = chrome
  timeouts {
      implicitlywait = 7000
      fluentwait = 10000
    }
}
headless.mode = false

chrome.capabilities.acceptSslCerts = true
chrome.capabilities.handlesAlerts = true

#
# Chrome options can be defined using the chrome.switches property
#
chrome.switches="""--start-maximized;--test-type;--no-sandbox;--ignore-certificate-errors;
                   --disable-popup-blocking;--disable-default-apps;--disable-extensions-file-access-check;
                   --incognito;--homepage=about:blank;--disable-infobars;--disable-gpu"""

webdriver.chrome.driver = "drivers/chromedriver"
webdriver.gecko.driver = "drivers/geckodriver"

I do not know why have this error and how to fix it.

Please help me!
Thanks!

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants