webdriver.io Snippets
Testcases
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
describe('Testcases', function(){ /*------------------------------------------------------------------ before ------------------------------------------------------------------*/ before(function(){ // actions for dem Testcase }); /*------------------------------------------------------------------ Testcase A ------------------------------------------------------------------*/ it('Testcase A', function (done) { // test code here }); /*------------------------------------------------------------------ Testcase B ------------------------------------------------------------------*/ it('Testcase B', function (done) { // test code here }); }); |
URL aufrufen und Screenshot erstellen
1 2 3 4 5 |
browser .url(page.href) .pause(1000) .saveScreenshot('./screenshots/filename.png') .call(done) |
Browser Größe bzw. Viewport ändern
1 2 3 |
browser .setViewportSize({width: 800, height: 600}, false) .windowHandleSize({width: width, height: height}); |
Weiterlesen