Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
should.not.exist(wd.PromiseChainWebdriver.prototype[name]);
});
};
beforeEach(function() {
noExtraMethodCheck();
});
afterEach(function() {
_(allExtraMethodNames).each(function(name) {
wd.removeMethod(name);
});
noExtraMethodCheck();
});
partials['wd.addPromisedMethod'] =
'<div id="theDiv">Hello World!</div>';
it('wd.addPromisedMethod', function() {
_(extraPromiseNoChainMethods).each(function(method, name) {
wd.addPromiseMethod(name, method);
});
return browser
.sleepAndElementById('theDiv').should.be.fulfilled
.then(function() {
return browser.sleepAndText().should.be.fulfilled;
}).then(function() {
return browser.sleepAndElementById('theDiv');
}).then(function(el){
return browser.sleepAndText(el).should.become("Hello World!");
});
});