- Documentation
- Quick Start Guide
- Selenium Grid Configuration
- Auto Scaling
- Spot Instance Nodes
- Selenium Grid Integration
- Pre Launch API Integration
- Selenium V4 Grid Code Examples
- Selenium V2/V3 Grid Code Examples
- Performance Testing
WebdriverIO Example
WebdriverIO is supported by Gridlastic, run your tests in the cloud at blazing speed on real browsers. We also support other javascript frameworks like wd.js and Protractor AngularJS.
The Gridlastic hub endpoint and the video url used in this code example is displayed after launching your Gridlastic selenium grid. See documention Selenium Grid Configuration Parameters where to find these credentials and replace with your own.
Get a free account and launch your Gridlastic selenium grid, then run this code locally and test your grid!
Note: you must use the selenium client version equivalent to your selected selenium grid version. Example: If you selected to use selenium version 3.5.3 for your selenium grid (recommended for WebdriverIO until a stable selenium V4 version is released), install/use the equivalent selenium client version (3.53.x) in your local framework.
var webdriverjs = require('webdriverio'), client = webdriverjs.remote({ desiredCapabilities: { browserName: 'chrome', version: 'latest', platform: 'WIN10', platformName: 'windows', video: 'True' }, host: 'HUB_SUBDOMAIN.gridlastic.com', protocol: https, port: 443, user: USERNAME, key: ACCESS_KEY }).init(); client .url('https://www.google.com/ncr') .setValue('*[name="q"]','webdriverio') .click('*[name="btnG"]') .pause(1000) .session(function(err,res) { console.log("Video: " + VIDEO_URL + res.value['webdriver.remote.sessionid']); }) .end();Note: starting from selenium version 3.9.1 you must also include "platformName": "windows" in the request when testing with firefox and IE.
Try our
SELENIUM GRID DEMO