Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.25 KB

5-debug.md

File metadata and controls

51 lines (35 loc) · 1.25 KB

Debug & Pause

Links

Exercise (click item for solution)

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

Next Exercise