se-runner-browserstack-example
Version:
Ready to run example using se-runner with grunt-se-runner and se-runner-framework-jasmine towards BrowserStack
20 lines (18 loc) • 630 B
JavaScript
module.exports = function (context) {
var webdriver = require('selenium-webdriver');
return function (done) {
context.driver.wait(webdriver.until.elementLocated({
className: 'play'
}), context.timeout)
.then(function (element) {
element.click()
.then(done)
.thenCatch(function (e) {
console.log('Error clicking play:');
console.log(e);
done.fail(e);
});
})
.thenCatch(done.fail);
};
};