Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_(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!");
});
});
partials['wd.addElementPromisedMethod'] =
'<div id="theDiv">\n' +
' <div id="div1">\n' +
' <span>one</span>\n' +
' <span>two</span>\n' +
' </div>\n' +
' <div id="div2">\n' +
' <span>one</span>\n' +
' <span>two</span>\n' +
' <span>three</span>\n' +
' </div>\n' +
'</div>\n';
it('wd.addElementPromisedMethod', function() {
_(extraElementPromiseNoChainMethods).each(function(method, name) {
wd.addElementPromiseMethod(name, method);
});
return browser