CodeceptJS - Selenoid Integration

Have you ever founds so much trouble to setup selenium grid in your CI. Then it’s your time to try this new awesome thing -> Selenoid: Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

The integration is not simpler than this.

Start browser automation in minutes by copy-pasting just one command :
$ curl -s https://aerokube.com/cm/bash | bash && ./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:

What’s next. Run your test as you do and enjoy things are running! :sunny:

Bonus: If you want to access the Selenoid UI. Not a problem

Run this command
$ docker run -d --name selenoid-ui \ --link selenoid \ -p 8080:8080 \ aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444

Then access the UI on port 8080:

http://localhost:8080/

3 Likes

Can you please guide how to connect to remote selenoid ?

Tests are in windows box and selenoid on rhel VM. [Manually set on VM]

  1. plugin needed in config?
    selenoid: {

     enabled: true,
    
     deletePassed: true,
    
     autoCreate: false,
    
     autoStart: false,
    
     sessionTimeout: '30m',
    
     enableVideo: true,
    
     enableLog: true,
    

    }

  2. what entries in helper ?
    WebDriver: {

    url: process.env.CODECEPT_URL || “http://tawin2k16build3:18080/dih-console/login.jsp”,

    browser: “chrome”,

    version:80.0,

    host:‘http://indihdev02.informatica.com:8080’,

    port:4444,

    path:‘wd/hub’,

    smartWait: 120000,

    windowSize: “1440x881”,

    waitForTimeout: 120000,

    remoteFileUpload: false

  3. what needed in browsers.json : ?
    “chrome”: {

     "default": "80.0",
    
     "versions": {
    
         "80.0": {
    
             "image": "selenoid/vnc:chrome_80.0",
    
             //...
    
             "env" : ["LANG=ru_RU.UTF-8", "LANGUAGE=ru:en", "LC_ALL=ru_RU.UTF-8"]
    
         }
    
     }
    

    }

}