- Setting Timeouts in Mocha Tests
- Setting Timeouts in WebdriverIO
- Pause Command
- The WebdriverIO Debug Command (video)
- Debugging
- REPL
Use `pause` to confirm that carousel rotates on homepage after four seconds (hint: use `getAttribute('class')` command)
// test/basic.js
it('should rotate the banner image after four seconds', function () {
this.timeout(15000);
browser.url('');
var firstActiveImage = $('.orbit-container .is-active');
browser.pause(4000);
expect(firstActiveImage.getAttribute('class')).to.not.contain('.is-active');
})
use 'debug' to run commands from inside the test run
In test file:
browser.debug();
When running wdio
test command:
./node_modules/.bin/wdio --mochaOpts.timeout=999999