Skip to content

thiagodp/concordialang-codeceptjs-webdriverio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

npm version GitHub last commit

concordialang-codeceptjs-webdriverio

๐Ÿ”Œ Concordia compiler plug-in for CodeceptJS with WebDriverIO

Generates and executes test scripts CodeceptJS with WebDriverIO, aiming to verify web applications.

Install

Requirements:

Installation via Concordia Compiler:

concordia --plugin-install codeceptjs-webdriverio

Installation via NPM:

npm i -D concordialang-codeceptjs-webdriverio

Note: You can also use PNPM or Yarn.

Execution

Step 1: Open the testing server

Since WebDriverIO uses Selenium, it requires to start Selenium before running the tests.

npx concordia --plugin-serve codeceptjs-webdriverio

Step 2: Run

npx concordia -p codeceptjs-webdriverio

Documentation

Configuration file

CodeceptJS reads its configuration from codeceptjs.json. This plug-in adds the "WebDriver" to the property helpers with a basic configuration. Please see WebDriver Configuration for details on how to extend it.

Version 2 adds the property "WebDriver" with the following configuration:

{

	"helpers": {
		"WebDriver": {
			"browser": "firefox",
			"url": "http://localhost",
			"windowSize": "maximize",
			"smartWait": 5000,
			"host": "127.0.0.1",
      		"port": 4444,
			"path": "/wd/hub",
      		"restart": false,
			"desiredCapabilities": {
        		"chromeOptions": {
          			"args": [ /*"--headless",*/ "--disable-gpu", "--no-sandbox" ]
        		}
      		}
		}
	}
}

Versions 0.x and 1.x add "WebDriverIO" with the following configuration:

{
	"helpers": {
		"WebDriverIO": {
			"browser": "chrome",
			"url": "http://localhost",
			"windowSize": "maximize",
			"smartWait": 5000,
			"timeouts": {
				"script": 60000,
				"page load": 10000
			}
		}
	}
}

Tips

  • You can change the value of the property url to your application's URL, e.g., "http://localhost/myapp".
  • You can change the value of the property browser to the desired browser to test, e.g., "firefox".
  • See more options.

See also

License

AGPL ยฉ Thiago Delgado Pinto