javascript - Sleeps, waitUntil, waitForVisible, waitForExist webdriverio -


i coming world of python , bit confused on how can add sleeps test (only been @ js week). understand sleeps not best practice, though learn how can done. have test launches browser fails because load times on page. debugging purposes, pause test couple seconds. have not work. thank responses.

var assert = require('assert');  describe('basic login', function() { it('verify user able login', function () {     browser.url('http://localhost:3000');     var elem = browser.element('div.accounts-dropdown > div.dropdown-toggle > span');     //elem.waitforvisible(2000); //not working     //elem.waitforexist(3000); //not working     return browser.waituntil (function async() {         elem.click();         browser.setvalue('//input', 'sy7nktvw@localhost');         browser.setvalue('//div[2]/input', 'ku3spn75');         browser.click("//button[@type='submit']");         assert('//li/div/button');      }, 50000, 'something_test');     //browser.click('div.accounts-dropdown > div.dropdown-toggle > span'); }); 

});

browser.pause(milliseconds) want.

browser.pause(1000);


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -