Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

Selenoid

Build Status Coverage Go Report Card Release Docker Pulls StackOverflow Tag

Selenoid is a powerful implementation of Selenium hub using Docker containers to launch browsers. Selenoid Animation

Features

One-command Installation

Start browser automation in minutes by downloading Configuration Manager binary and running just one command:

$ ./cm selenoid start --vnc --tmpfs 128

That's it! You can now use Selenoid instead of Selenium server. Specify the following Selenium URL in tests:

http://localhost:4444/wd/hub

Ready to use Browser Images

No need to manually install browsers or dive into WebDriver documentation. Available images: Browsers List

New images are added right after official releases. You can create your custom images with browsers.

Live Browser Screen and Logs

New rich user interface showing browser screen and Selenium session logs: Selenoid UI

Video Recording

  • Any browser session can be saved to H.264 video (example)
  • An API to list, download and delete recorded video files

Convenient Logging

  • Any browser session logs are automatically saved to files - one per session
  • An API to list, download and delete saved log files

Lightweight and Lightning Fast

Suitable for personal usage and in big clusters:

  • Consumes 10 times less memory than Java-based Selenium server under the same load
  • Small 6 Mb binary with no external dependencies (no need to install Java)
  • Browser consumption API working out of the box
  • Ability to send browser logs to centralized log storage (e.g. to the ELK-stack)
  • Fully isolated and reproducible environment

Detailed Documentation and Free Support

Maintained by a growing community:

Complete Guide & Build Instructions

Complete reference guide (including building instructions) can be found at: http://aerokube.com/selenoid/latest/

Selenoid in Kubernetes

Selenoid was initially created to be deployed on hardware servers or virtual machines and is not suitable for Kubernetes. Detailed motivation is described here. If you still need running Selenium tests in Kubernetes, then take a look at Moon - our dedicated solution for Kubernetes.

Known Users

JetBrains Yandex Sberbank Technology ThoughtWorks VK.com SuperJob PropellerAds AlfaBank 3CX IQ Option Mail.Ru Group Newegg.Com Badoo BCS Quality Lab AT Consulting Royal Caribbean International Sixt Testjar Flipdish

Owner
Aerokube
Selenium and Playwright testing infrastructure
Aerokube
Comments
  • File upload doesn't work

    File upload doesn't work

    🐛 Bug Report

    File upload is not working using RemoteWebDriver. It is working fine running locally but fails on Remote.

    Last compatible WebDriver version 4.0.0-alpha05 Stop working since 4.0.0-alpha07 Still not working in 4.0.0-beta2

    Unable to upload file: System.NotImplementedException: unknown command: unknown command: session/eaee033d03861677627f084357ea877a/se/file
       at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebElement.UploadFile(String localFile)
       at OpenQA.Selenium.Remote.RemoteWebElement.SendKeys(String text)
       at SeleniumExtras.PageObjects.WebElementProxy.SendKeys(String text)
    

    To Reproduce

    driver.FindElement(By.Id("upload")).SendKeys(file);

    Expected behavior

    File uploaded successfully

    Test script or set of commands reproducing this issue

                    var chromeOptions = new ChromeOptions();
    
                    chromeOptions.AddArguments("headless", "--window-size=1920,1080", "--safebrowsing-disable-download-protection");
    
                    chromeOptions.AddUserProfilePreference("download.default_directory", "/home/selenium/Downloads");
                    chromeOptions.AddUserProfilePreference("download.prompt_for_download", false);
                    chromeOptions.AddUserProfilePreference("download.directory_upgrade", true);
                    chromeOptions.AddUserProfilePreference("safebrowsing.enabled", false);
    
                    chromeOptions.SetLoggingPreference(LogType.Browser, LogLevel.All);
                    var driver = new RemoteWebDriver(new Uri(Browser.HubUri), chromeOptions);
    
                    driver.Navigate().GoToUrl("<URL>");
    
                    IAllowsFileDetection fileDetectionDriver = (IAllowsFileDetection)driver;
                    fileDetectionDriver.FileDetector = new LocalFileDetector();
    
                    var file = "<File_Path>";
    
                    driver.FindElement(By.Id("upload")).SendKeys(file);
    

    Environment

    Selenoid: 1.10.3 Browser: Chrome Browser version: 89.0.4389.114 Browser Driver version: Selenium.WebDriver.ChromeDriver -Version 89.0.4389.2300 Language Bindings version: C#

    Notes

    Related bug for WebDriver https://github.com/SeleniumHQ/selenium/issues/9350

  • Selenoid not recording video on Win10 Pro

    Selenoid not recording video on Win10 Pro

    Hi! Could you please help - on Windows 10 I'm not able to record/save videos. VNC is enabled, I can see test running in selenoid-ui, but folder video directory is always empty, http://localhost:4444/video/ displays blank page, http://localhost:4444/video/selenoid%sessionId%.mp4 returns 404. The same project (with appropriate changes to pathes) is working and saving videos on Linux Mint.

    I run via docker-compose up following yaml:

    version: '3.4'
    
    services:
      selenoid:
        image: aerokube/selenoid:latest-release
        container_name: "selenoid"
        volumes:
          - "/p/QA/SelenoidTest/selenoid:/etc/selenoid"
          - "/p/QA/SelenoidTest/selenoid/video:/opt/selenoid/video"
          - "/p/QA/SelenoidTest/selenoid/logs:/opt/selenoid/logs"
          - "/p/QA/SelenoidTest/selenoid/downloads:/home/selenium/Downloads"
          - "//var/run/docker.sock:/var/run/docker.sock"
        environment:
          - OVERRIDE_VIDEO_OUTPUT_DIR=/p/QA/SelenoidTest/selenoid/video/
        command: ["-capture-driver-logs", "-save-all-logs", "-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-log-output-dir", "/opt/selenoid/logs", "-timeout", "10m", "-capture-driver-logs"]
        ports:
          - "4444:4444"
        network_mode: bridge
      selenoid-ui:
        image: aerokube/selenoid-ui
        container_name: "selenoid-ui"
        network_mode: bridge
        links:
          - selenoid
        ports:
          - "8080:8080"
        command: [ "--selenoid-uri","http://selenoid:4444" ]
    

    And here's full log:

    P:\QA\SelenoidTest> docker-compose up
    Starting selenoid ... done
    Starting selenoid-ui ... done
    Attaching to selenoid, selenoid-ui
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Loading configuration files...]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Video Dir: /opt/selenoid/video]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Logs Dir: /opt/selenoid/logs]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Saving all logs]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Your Docker API version is 1.40]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Timezone: UTC]
    selenoid       | 2020/11/06 08:21:11 [-] [INIT] [Listening on :4444]
    selenoid-ui    | 2020/11/06 08:21:11 [INIT] [Listening on :8080]
    selenoid       | 2020/11/06 08:21:22 [-] [NEW_REQUEST] [unknown] [172.17.0.1]
    selenoid       | 2020/11/06 08:21:22 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.1]
    selenoid       | 2020/11/06 08:21:22 [0] [LOCATING_SERVICE] [chrome] [86.0]
    selenoid       | 2020/11/06 08:21:22 [0] [USING_DOCKER] [chrome] [86.0]
    selenoid       | 2020/11/06 08:21:22 [0] [CREATING_CONTAINER] [selenoid/vnc:chrome_86.0]
    selenoid       | 2020/11/06 08:21:22 [0] [STARTING_CONTAINER] [selenoid/vnc:chrome_86.0] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41]
    selenoid       | 2020/11/06 08:21:22 [0] [CONTAINER_STARTED] [selenoid/vnc:chrome_86.0] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41] [0.21s]
    selenoid       | 2020/11/06 08:21:22 [0] [CREATING_VIDEO_CONTAINER] [selenoid/video-recorder:latest-release]
    selenoid       | 2020/11/06 08:21:22 [0] [STARTING_VIDEO_CONTAINER] [selenoid/video-recorder:latest-release] [5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8]
    selenoid       | 2020/11/06 08:21:22 [0] [VIDEO_CONTAINER_STARTED] [selenoid/video-recorder:latest-release] [5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8] [0.24s]
    selenoid       | 2020/11/06 08:21:22 [0] [SERVICE_STARTED] [selenoid/vnc:chrome_86.0] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41] [0.10s]
    selenoid       | 2020/11/06 08:21:22 [0] [PROXY_TO] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41] [http://172.17.0.4:4444]
    selenoid       | 2020/11/06 08:21:22 [0] [SESSION_ATTEMPTED] [http://172.17.0.4:4444] [1]
    selenoid       | 2020/11/06 08:21:22 [0] [SESSION_CREATED] [cd71e146d3b3ef376bb3f1403647ec9f] [1] [0.84s]
    selenoid       | 2020/11/06 08:21:33 [30] [SESSION_DELETED] [cd71e146d3b3ef376bb3f1403647ec9f]
    selenoid       | 2020/11/06 08:21:33 [0] [STOPPING_VIDEO_CONTAINER] [5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8]
    selenoid       | 2020/11/06 08:21:34 [0] [REMOVING_CONTAINER] [5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8]
    selenoid       | 2020/11/06 08:21:34 [0] [FAILED_TO_REMOVE_CONTAINER] [5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8] [Error response from daemon: removal of container 5cfa721a87614988efb933adf64f231626e95224c7842f1bc18b8b44dae4ccd8 is already in progress]
    selenoid       | 2020/11/06 08:21:34 [0] [REMOVING_CONTAINER] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41]
    selenoid       | 2020/11/06 08:21:34 [0] [CONTAINER_REMOVED] [2ae25f0b731510cbbe78468c855624a0d1f104ee521c0a256d5166957478de41]
    selenoid       | 2020/11/06 08:21:34 [0] [VIDEO_ERROR] [Failed to rename /opt/selenoid/video/selenoid7b08eee3d902d5a9ee0f1360b49bb510.mp4 to /opt/selenoid/video/cd71e146d3b3ef376bb3f1403647ec9f.mp4: rename /opt/selenoid/video/selenoid7b08eee3d902d5a9ee0f1360b49bb510.mp4 /opt/selenoid/video/cd71e146d3b3ef376bb3f1403647ec9f.mp4: no such file or directory]
    
  • Selenoid restarting in docker for windows

    Selenoid restarting in docker for windows

    I'm currently trying to start a selenoid container using docker for windows with Windows 10 Pro. I seem to be having the exact same problem mentioned in #155, where selenoid is stuck in a restarting state.

    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${HOME}:/root aerokube/cm:latest-release selenoid start --vnc --tmpfs 128 is the command I run in powershell to start the selenoid container. When I inspect the logs the issue is the same as the one mentioned in #155 :read error: open etc/selenoid/browsers.json: no such file or directory.

    I'm using the latest cm and selenoid images.

  • Require image for ARM64 architecture

    Require image for ARM64 architecture

    Hi Team,

    I am trying to use the selenoid/vnc image on the arm64 platform but it seems it is not available for arm64.

    I have successfully built the image using the command docker build -t <image_name> . on the arm64 platform by making some changes in the files .github/workflows/build.yml and ci/build.sh.

    I have used Github actions to build and push the image for both the platforms.

    Commit Link - https://github.com/odidev/selenoid/commit/67c0292a00446660dd6d09d0c7c7024438085b10

    Github actions link - https://github.com/odidev/selenoid/runs/2662087679?check_suite_focus=true

    Docker Hub Link - https://hub.docker.com/repository/registry-1.docker.io/odidev/selenoid/tags?page=1&ordering=last_updated

    Do you have any plans on releasing arm64 images?

    It will be very helpful if an arm64 image is available. If interested, I will raise a PR.

  • Failed container creation

    Failed container creation

    docker --version
    Docker version 17.03.1-ce, build c6d412e
    
    lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.1 LTS
    Release:        16.04
    Codename:       xenial
    
    sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /root:${HOME} aerokube/cm:latest-release selenoid start --vnc --tmpfs 128
    2017/07/01 01:28:39 Using Docker...
    2017/07/01 01:28:39 registry.ping url=https://registry.hub.docker.com/v2/
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x7e2353]
    
    goroutine 1 [running]:
    github.com/aerokube/cm/cmd.startImpl(0x0)
            /home/travis/gopath/src/github.com/aerokube/cm/cmd/selenoid_start.go:18 +0x43
    github.com/aerokube/cm/cmd.glob..func6(0xb672e0, 0xc4201b1cb0, 0x0, 0x3)
            /home/travis/gopath/src/github.com/aerokube/cm/cmd/selenoid_start.go:12 +0x2c
    github.com/aerokube/cm/vendor/github.com/spf13/cobra.(*Command).execute(0xb672e0, 0xc4201b1c20, 0x3, 0x3, 0xb672e0, 0xc4201b1c20)
            /home/travis/gopath/src/github.com/aerokube/cm/vendor/github.com/spf13/cobra/command.go:636 +0x231
    github.com/aerokube/cm/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xb66840, 0xb67720, 0xc42017df68, 0x7e304c)
            /home/travis/gopath/src/github.com/aerokube/cm/vendor/github.com/spf13/cobra/command.go:722 +0x339
    github.com/aerokube/cm/cmd.Execute()
            /home/travis/gopath/src/github.com/aerokube/cm/cmd/root.go:26 +0x2d
    main.main()
            /home/travis/gopath/src/github.com/aerokube/cm/cm.go:8 +0x20
    
    curl https://registry.hub.docker.com/v2/
    {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
    
    curl https://api.github.com/repos/aerokube/selenoid/releases/latest
    {
      "url": "https://api.github.com/repos/aerokube/selenoid/releases/6746048",
      "assets_url": "https://api.github.com/repos/aerokube/selenoid/releases/6746048/assets",
      "upload_url": "https://uploads.github.com/repos/aerokube/selenoid/releases/6746048/assets{?name,label}",
      "html_url": "https://github.com/aerokube/selenoid/releases/tag/1.3.2",
      "id": 6746048,
      "tag_name": "1.3.2",
    ...
    
  • selenoid + docker + safari

    selenoid + docker + safari

    I'm trying to run tests on safari with docker. When I setup selenoid on pure macos (with safari) all works fine. But when I run it as a docker container, tests fail with error - could not find environment (and it is logically, because there's no safari in docker, but I didn't find any images for them). I've run container by following command:

    $ curl -Lo ~/cm https://github.com/aerokube/cm/releases/download/1.5.7/cm_darwin_amd64 && \
        chmod +x ~/cm && \
        ~/cm selenoid start --browsers safari
    

    Is there any way to pre-install safari to docker? or maybe did I wrong something other?

  • java can not connect selenoid android (org.openqa.selenium.WebDriverException)

    java can not connect selenoid android (org.openqa.selenium.WebDriverException)

    i want to try android edge/chrome, but create session fail.       image AndroidTest .java

    import java.io.File;
    import java.net.MalformedURLException;
    import java.net.URI;
    import java.net.URL;
    import java.util.List;
    import java.util.UUID;
    import java.util.concurrent.TimeUnit;
    
    import org.junit.After;
    import org.junit.Before;
    import org.junit.Test;
    import org.openqa.selenium.By;
    import org.openqa.selenium.Capabilities;
    import org.openqa.selenium.Keys;
    import org.openqa.selenium.OutputType;
    import org.openqa.selenium.Proxy;
    import org.openqa.selenium.TakesScreenshot;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.interactions.HasTouchScreen;
    import org.openqa.selenium.interactions.TouchScreen;
    import org.openqa.selenium.remote.Augmenter;
    import org.openqa.selenium.remote.CapabilityType;
    import org.openqa.selenium.remote.DesiredCapabilities;
    import org.openqa.selenium.remote.RemoteTouchScreen;
    import org.openqa.selenium.remote.RemoteWebDriver;
    
    import io.appium.java_client.AppiumDriver;
    import io.appium.java_client.MobileElement;
    import io.appium.java_client.android.AndroidDriver;
    import io.appium.java_client.android.AndroidElement;
    import io.selendroid.client.SelendroidDriver;
    import io.selendroid.common.SelendroidCapabilities;
    
    public class AndroidTest {
    	private RemoteWebDriver driver;
    
    	@Before
    	public void openBrowser() throws Exception {
    		final DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    		capabilities.setCapability("enableVNC", true);
    		capabilities.setCapability("screenResolution", "1920x1080x24");
    		capabilities.setBrowserName("android");
    		capabilities.setVersion("8.1");
    		
    		driver = new RemoteWebDriver(new URL("http://144.202.111.4:4444/wd/hub"), capabilities);
    	}
    	
    	@Test
    	public void browserTesting() throws Exception {
    		try {
    			Thread.sleep(3000);
    			driver.get("http://duckduckgo.com/");
    			WebElement input = driver.findElement(By.cssSelector("input#search_form_input_homepage"));
    			input.sendKeys(Keys.chord("selenium",Keys.ENTER));
    			Thread.sleep(10000);
    		} finally {
    			
    		}
    	}
    	
    	@After
    	public void closeDrive() {
    		if(driver != null) {
    			driver.quit();
    			driver = null;
    		}
    	}
    	
    
    }
    

    error messenge

    org.openqa.selenium.WebDriverException: wait: http://172.17.0.4:4444/wd/hub does not respond in 30s (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 30.96 seconds
    Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
    System info: host: 'DESKTOP-GO4ATLA', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
    Driver info: driver.version: RemoteWebDriver
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
    	at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
    	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
    	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
    	at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
    	at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
    	at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
    	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    	at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
    	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    	at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
    	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
    	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
    	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
    	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
    	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
    	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)
    	at AndroidTest.openBrowser(AndroidTest.java:46)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    
  • Sometimes Browser stays open

    Sometimes Browser stays open

    Hi, using selenoid on Windows with grr (if that matters). Running out tests, sometimes the browser doesn't close on a windows node and selenoid last logs are: [NEW REQUEST].

    For the example below, I looked at the machine at 10:00 o'clock and the last [NEW REQUEST] ist from 06:43.

    We are starting selenoid like this: selenoid_windows_386.exe -conf browsers.json -disable-docker -enable-file-upload -timeout 120s -session-attempt-timeout 120s -session-delete-timeout 120s -limit 1 -retry-count 10

    Maybe driver.quit() wasnt called under some circumstance, but I would assume, that selenoid has to timeout in such a case. Any ideas?

    selenoid_console

  • Unable to parse remote response: 404 page not found

    Unable to parse remote response: 404 page not found

    Tried to use selenoid on my AWS instance. I used the following configs:

    docker-compose.yml

    version: "2"
    services:
      selenoid:
        container_name: selenoid
        network_mode: bridge
        image: "aerokube/selenoid:latest-release"
        ports:
          - 4444:4444
        volumes:
          - ./config:/etc/selenoid:ro
          - "/var/run/docker.sock:/var/run/docker.sock"
    

    browsers.json

    {
        "chrome": {
            "default": "59.0",
            "versions": {
                "59.0": {
                    "image": "selenoid/chrome:59.0",
                    "port": "4444",
                    "path": "/",
                    "tmpfs": {
                        "/tmp": "size=128m"
                    }
                }
            }
        }
    }
    

    when I run my simple selenium test, I get this error:

    Unable to parse remote response: 404 page not found

    curl http://localhost:4444/status returns {"total":5,"used":0,"queued":0,"pending":0,"browsers":{"chrome":{"59.0":{}}}}

    What am I doing wrong?

  • Test Case not running on FF 54.0 & 55.0 with Selenoid

    Test Case not running on FF 54.0 & 55.0 with Selenoid

    Selenoid: 1.3.5

    When I am running my Test Case on FF 54.0 or 55.0 , its showing error === enable vnc was not a the name of a known capability or a valid extension capability

    Now, after seeing this, if I remove the enableVNC cap, its showing error === version was not a the name of a known capability or a valid extension capability

    When I marked the default browser in my browser.json file FF 54.0, and only passing "Browser" in my Test Case, its running smoothly. Same works with FF 55.0 too.

    The same code is working fine till FF 52.0. Its only crying with FF 54.0 & 55.0.

    Not sure, what is the issue, Please provide some updates on this.

  • New chrome:92 image flakiness with selenoid 1.10.4

    New chrome:92 image flakiness with selenoid 1.10.4

    Hi! Since the friday release of selenoid 1.10.4 and chrome 92.0 browser image we experience some flakyness when executing tests.

    The chrome 92.0 image does not work with selenoid 1.10.3 at all, resulting in a WebDriverError: Host header or origin header is specified and is not whitelisted or localhost. error.

    When running selenoid 1.10.4 with the chrome 92.0 image, we see tests fail randomly with WebDriverError: New session attempts retry count exceeded. This seems like the new image might not work as expected. We have added a retry count to affected tests, but that does not fix fully the issue, sometimes it still can happen.

    Any ideas of how to correct this issue? Maybe the image was not built properly and a rebuild is required?

  • Video is not recorded at all

    Video is not recorded at all

    Hi! I'm trying to get some practice with selenoid, and i read about video recording feauture, but i can't use it. I added capabilty "enableVideo" but nothing happened. I'm using Win10, code written on C# and selenoid started with cm.exe. Here is how my driver initialized:

                ChromeOptions options = new ChromeOptions();
                options.AddArgument("--disable-notifications");
                options.AddAdditionalOption("enableVideo", true);
                options.AddAdditionalOption("enableLog", true);
                options.AddAdditionalOption("videoCodec", "mpeg4");
                options.BrowserVersion = "104.0";
                var driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options);
    

    This's container list without running any test:

    image

    And when test is running:

    image

    Also, here are the selenoid logs(which, by the way, are not recorded on the host machine either): image

    I tried to start the recorder container manually, but it's just 'sleeping' all the time: image

    What am i doing wrong?

  • Network container to be a an actually container/Browsers.json

    Network container to be a an actually container/Browsers.json

    Hi team,

    I was able to make Selenoid/and the UI run through Container as network... not :container network.

    The issue I'm facing at the moment, I'm not able to create sessions for the following reason:

    `2023/01/05 00:14:16 [190] [SERVICE_STARTUP_FAILED] [create container: Error response from daemon: conflicting options: hostname and the network mode]

    The command I'm using inside yaml is : "-container-network","container:gluetun", "gluetun" it's not a network container, it's an actual VPN container.

    I've tried to use a Container network but there was no way to mask the IP. the only option was to use the above case.

    Passing the browser container to run through the VPN container.

    I'm not sure if anyone has a better work around or a solution for that. `

  • Selenoid container keep disconnecting when running web test.

    Selenoid container keep disconnecting when running web test.

    Hello, Maybe someone can assist on this issue: Selenoid container keep disconnected on Docker when running web test, always disconnect on the same spot. We tried to update chrome driver, Docker and Selenoid versions, still same issue. This happens on specific machine, our others machines ran the same test just fine, with same configuration and versions. This issue happens only in chrome browser.

    Chrome Container Log:

    2022-12-28 14:14:47 pk12util: PKCS12 IMPORT SUCCESSFUL 2022-12-28 14:14:47 Warning: -clcerts option ignored with -export 2022-12-28 14:14:47 Warning: output encryption option -nodes ignored with -export 2022-12-28 14:14:47 2022/12/28 12:14:47 [INIT] [Listening on :7070] 2022-12-28 14:14:47 19 2022-12-28 14:14:47 Waiting X server... 2022-12-28 14:14:48 2022-12-28 14:14:48 --- x11vnc loop: 1 --- 2022-12-28 14:14:48 2022-12-28 14:14:49 --- x11vnc loop: waiting for: 197 2022-12-28 14:14:49 2022-12-28 14:14:48 Logging to: /dev/null 2022-12-28 14:14:48 Waiting X server... 2022-12-28 14:14:48 Waiting X server... 2022-12-28 14:14:48 Waiting X server... 2022-12-28 14:14:48 Waiting X server... 2022-12-28 14:14:48 Waiting X server... 2022-12-28 14:14:48 Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}) on port 4444 2022-12-28 14:14:48 All remote connections are allowed. Use an allowlist instead! 2022-12-28 14:14:48 Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. 2022-12-28 14:14:48 ChromeDriver was started successfully. 2022-12-28 14:14:49 PORT=5900

    Container Log:

    2022-12-28 15:53:53 2022/12/28 13:53:53 [-] [NEW_REQUEST] [unknown] [172.17.0.1] 2022-12-28 15:53:53 2022/12/28 13:53:53 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.1] 2022-12-28 15:53:53 2022/12/28 13:53:53 [9522] [LOCATING_SERVICE] [chrome] [] 2022-12-28 15:53:53 2022/12/28 13:53:53 [-] [DEFAULT_VERSION] [Using default version: 108.0] 2022-12-28 15:53:53 2022/12/28 13:53:53 [9522] [USING_DOCKER] [chrome] [108.0] 2022-12-28 15:53:53 2022/12/28 13:53:53 [9522] [CREATING_CONTAINER] [skylabsautomation1/selenoid:chrome_chrome_108.0] 2022-12-28 15:53:53 2022/12/28 13:53:53 [9522] [STARTING_CONTAINER] [skylabsautomation1/selenoid:chrome_chrome_108.0] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] 2022-12-28 15:53:54 2022/12/28 13:53:54 [9522] [CONTAINER_STARTED] [skylabsautomation1/selenoid:chrome_chrome_108.0] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] [0.77s] 2022-12-28 15:53:55 2022/12/28 13:53:55 [9522] [SERVICE_STARTED] [skylabsautomation1/selenoid:chrome_chrome_108.0] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] [1.46s] 2022-12-28 15:53:55 2022/12/28 13:53:55 [9522] [PROXY_TO] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] [http://172.17.0.4:4444] 2022-12-28 15:53:55 2022/12/28 13:53:55 [9522] [SESSION_ATTEMPTED] [http://172.17.0.4:4444] [1] 2022-12-28 15:53:56 2022/12/28 13:53:56 [9522] [SESSION_CREATED] [9c39270907f51f778a1b3a3180312d07] [1] [3.19s] 2022-12-28 15:54:14 2022/12/28 13:54:14 [9805] [SESSION_DELETED] [9c39270907f51f778a1b3a3180312d07] 2022-12-28 15:54:14 2022/12/28 13:54:14 [9522] [REMOVING_CONTAINER] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] 2022-12-28 15:54:15 2022/12/28 13:54:15 [-] [NEW_REQUEST] [unknown] [172.17.0.1] 2022-12-28 15:54:15 2022/12/28 13:54:15 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.1] 2022-12-28 15:54:15 2022/12/28 13:54:15 [9806] [LOCATING_SERVICE] [chrome] [] 2022-12-28 15:54:15 2022/12/28 13:54:15 [-] [DEFAULT_VERSION] [Using default version: 108.0] 2022-12-28 15:54:15 2022/12/28 13:54:15 [9806] [USING_DOCKER] [chrome] [108.0] 2022-12-28 15:54:15 2022/12/28 13:54:15 [9806] [CREATING_CONTAINER] [skylabsautomation1/selenoid:chrome_chrome_108.0] 2022-12-28 15:54:15 2022/12/28 13:54:15 [9806] [STARTING_CONTAINER] [skylabsautomation1/selenoid:chrome_chrome_108.0] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] 2022-12-28 15:54:15 2022/12/28 13:54:15 [9522] [CONTAINER_REMOVED] [d7c9b4c9a052a8536ca40b1be40d5e80487736aa18eb4676d8c9e7119b99b6bf] 2022-12-28 15:54:16 2022/12/28 13:54:16 [9806] [CONTAINER_STARTED] [skylabsautomation1/selenoid:chrome_chrome_108.0] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] [0.83s] 2022-12-28 15:54:17 2022/12/28 13:54:17 [9806] [SERVICE_STARTED] [skylabsautomation1/selenoid:chrome_chrome_108.0] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] [1.30s] 2022-12-28 15:54:17 2022/12/28 13:54:17 [9806] [PROXY_TO] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] [http://172.17.0.5:4444] 2022-12-28 15:54:17 2022/12/28 13:54:17 [9806] [SESSION_ATTEMPTED] [http://172.17.0.5:4444] [1] 2022-12-28 15:54:18 2022/12/28 13:54:18 [9806] [SESSION_CREATED] [822991ee0e4da354d93c16bdb7ffa2fe] [1] [3.16s] 2022-12-28 15:55:03 2022/12/28 13:55:03 [10351] [CONTAINER_LOGS] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] 2022-12-28 15:55:03 2022/12/28 13:55:03 [10352] [VNC_ENABLED] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:57:47 2022/12/28 13:57:47 [10345] [SESSION_TIMED_OUT] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:57:47 2022/12/28 13:57:47 [10386] [SESSION_DELETED] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:57:52 2022/12/28 13:57:52 [10352] [VNC_CLIENT_DISCONNECTED] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:57:52 2022/12/28 13:57:52 [10352] [VNC_SESSION_CLOSED] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:58:17 2022/12/28 13:58:17 [10345] [DELETE_FAILED] [822991ee0e4da354d93c16bdb7ffa2fe] [Delete "http://127.0.0.1:4444/wd/hub/session/822991ee0e4da354d93c16bdb7ffa2fe": context deadline exceeded] 2022-12-28 15:58:17 2022/12/28 13:58:17 [10386] [CLIENT_DISCONNECTED] [unknown] [127.0.0.1] [Error: context canceled] 2022-12-28 15:58:17 2022/12/28 13:58:17 [9806] [REMOVING_CONTAINER] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57] 2022-12-28 15:58:17 2022/12/28 13:58:17 [10345] [CLIENT_DISCONNECTED] [unknown] [172.17.0.1] [Error: EOF] 2022-12-28 15:58:17 2022/12/28 13:58:17 [10351] [CONTAINER_LOGS_DISCONNECTED] [822991ee0e4da354d93c16bdb7ffa2fe] 2022-12-28 15:58:18 2022/12/28 13:58:18 [9806] [CONTAINER_REMOVED] [f01b20adb4b5aeac33a5158baf97894f6b91137225c01ec02ed4aa89947c9a57]

    as you can see Client disconnected and container removed.

    Docker Version: 4.15.0 Selenoid Version: 1.10.9 Chrome Version: 108 API Version: 1.41 Git Version: go1.18.7 OS: MS Windows

    Would appreciate for any ideas. Thanks.

  • @vania-pooh Found an easier solution.

    @vania-pooh Found an easier solution.

        @vania-pooh Found an easier solution.
    

    Checked out it for chrome. If setting the CHROME_LOG_FILE environment variable to /home/selenium/Downloads you can grab it through the downloads API. Or even better, if setting the env variable to /dev/stdout you will get the logs automatically saved by Selenoid.

    Originally posted by @kornel-filep in https://github.com/aerokube/selenoid/issues/1082#issuecomment-816726051

  • Login in Chrome using devTools() setExtraHTTPHeaders()

    Login in Chrome using devTools() setExtraHTTPHeaders()

    We have test sites that require an authorization auth

    I'm trying login on site using devtools protocol but i dont know how exacly.

    If i use selenium 4 devtools localy code like this works:

        @Test
        public void localChromeLoginTest() throws MalformedURLException {
            driver = createLocalChromeDriver();
            var augmenter = new Augmenter();
            driver = augmenter.augment(driver);
    
            var devTools = ((HasDevTools) driver).getDevTools();
            devTools.createSession();
    
            driver = augmenter.
                addDriverAugmentation("chrome", HasAuthentication.class, (caps, exec) ->
                    (whenThisMatches, useTheseCredentials) -> {
                        devTools.getDomains().network().addAuthHandler(whenThisMatches, useTheseCredentials);
                    }).augment(driver);
    
            ((HasAuthentication) driver).register(UsernameAndPassword.of(username, password));
    
            driver.get("URL HERE");
        }
    

    I could not find any example how to do this with selenoid devtools protocol. I found only https://github.com/aerokube/chrome-developer-tools-protocol-java-example/blob/master/src/test/java/com/aerokube/selenoid/ChromeDevtoolsTest.java. But there is no example, no documentation.

    I have tried something like this:

        @Test
        public void chromeStartTest3() throws MalformedURLException, WebSocketServiceException, URISyntaxException {
            driver = createRemoteChromeDriver();
    
            var id = ((RemoteWebDriver) driver).getSessionId();
            var devToolsUrl = String.format("wss://selenoid.domain/devtools/%s/page", id);
    
            devtools = ChromeDevToolsService.from(devToolsUrl);
    
            var n = devtools.getNetwork();
    
            var logon = Base64.getEncoder().encode("%s:%s".formatted(username, password).getBytes(StandardCharsets.UTF_8));
            n.setExtraHTTPHeaders(Map.of("Authorization", "Basic " + new String(logon)));
    
            n.enable();
            // n.enable(100000, 100000, 100000);
    
            driver.get("URL HERE");
        }
    

    in diffrent variation but no luck.

    Could someone help me, please :)

A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

About chromedp Package chromedp is a faster, simpler way to drive browsers supporting the Chrome DevTools Protocol in Go without external dependencies

Dec 28, 2022
Simple mock program to set charging rate of a battery instance based on the national grid intensity api

Charger Simple mock program to set charging rate of a battery instance based on the national grid intensity api. Steps to get up and running I have cr

Nov 16, 2021
A lightweight load balancer used to create big Selenium clusters
A lightweight load balancer used to create big Selenium clusters

Go Grid Router Go Grid Router (aka Ggr) is a lightweight active load balancer used to create scalable and highly-available Selenium clusters. Articles

Dec 28, 2022
Immutable transaction isolated sql driver for golang

Single transaction based sql.Driver for GO Package txdb is a single transaction based database sql driver. When the connection is opened, it starts a

Jan 6, 2023
Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻

Gnomock – tests without mocks ??️ Spin up entire dependency stack ?? Setup initial dependency state – easily! ?? Test against actual, close to product

Dec 29, 2022
Stupidly fast, completely serverless and infinitely scalable stress tester.
Stupidly fast, completely serverless and infinitely scalable stress tester.

dontstress Stupidly fast, completely serverless and infinitely scalable stress tester. Don't stress over your failing competitive programming task sol

Nov 15, 2021
Hive-fleet: a distributed, scalable load-testing tool built in go that leverages Google Cloud Functions

hive-fleet hive-fleet is a distributed, scalable load-testing tool, built on top

Jan 27, 2022
Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.

?? Playwright for API reference | Example recipes Playwright is a Go library to automate Chromium, Firefox and WebKit with a single API. Playwright is

Jan 1, 2023
fuzzer for a single http parameter which checks if the response does/does not contain a certain given string

single http parameter fuzzer DISCLAIMER: ONLY USE THIS PROGRAM ON TARGETS YOU HAVE PERMISSION TO FUZZ! Initially used as a "poor man's" http fuzzer fo

Dec 19, 2021
Testing framework for Go. Allows writing self-documenting tests/specifications, and executes them concurrently and safely isolated. [UNMAINTAINED]

GoSpec GoSpec is a BDD-style testing framework for the Go programming language. It allows writing self-documenting tests/specs, and executes them in p

Nov 28, 2022
A tool for generating self-contained, type-safe test doubles in go

counterfeiter When writing unit-tests for an object, it is often useful to have fake implementations of the object's collaborators. In go, such fake i

Jan 5, 2023
Robust framework for running complex workload scenarios in isolation, using Go; for integration, e2e tests, benchmarks and more! 💪

e2e Go Module providing robust framework for running complex workload scenarios in isolation, using Go and Docker. For integration, e2e tests, benchma

Jan 5, 2023
Benchmarking deferent Fibonacci functions and algorithms with running unit test

GoFibonacciBench Benchmarking deferent Fibonacci functions and algorithms with running unit test ... Introduction: Fibonacci numbers are special kinds

Feb 27, 2022
Testy is a Go test running framework designed for Gametime's API testing needs.

template_library import "github.com/gametimesf/template_library" Overview Index Overview Package template_library is a template repository for buildin

Jun 21, 2022
Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡
Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡

Table of contents 1. About 2. Getting Started i. Installation ii. Initialize rit locally iii. Add your first formulas repository iv. Run the Hello Wor

Dec 29, 2022
CLI tool to mock TCP connections. You can use it with Detox, Cypress or any other framework to automatically mock your backend or database.

Falso It is a CLI that allows you to mock requests/responses between you and any server without any configuration or previous knowledge about how it w

Sep 23, 2022
Cloud-Native A/B Testing Platform (WIP) 云原生的 A/B 测试平台

云原生的 A/B 测试系统 介绍 A/B 测试起源于农业工程。人们将土地划分为不同的地块,通过种植不同的农作物来确定在这些土地上更适合种植何种作物。随后 A/B 测试被广泛地应用于医学、工业等不同领域。

Sep 19, 2022
Fast cross-platform HTTP benchmarking tool written in Go

bombardier bombardier is a HTTP(S) benchmarking tool. It is written in Go programming language and uses excellent fasthttp instead of Go's default htt

Dec 31, 2022
📡 mock is a simple, cross-platform, cli app to simulate HTTP-based APIs.
 📡 mock is a simple, cross-platform, cli app to simulate HTTP-based APIs.

mock ?? mock is a simple, cross-platform, cli app to simulate HTTP-based APIs. About mock Mock allows you to spin up a local http server based of a .m

May 6, 2022