Created
March 5, 2017 15:57
-
-
Save dictav/da1a279580446b2fb8f5ecd5484bf9b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const assert = require('assert') | |
describe('Console Log', () => { | |
it('gets the title of dictav.net', () => { | |
const title = browser.url('https://dictav.net').getTitle() | |
assert.equal(title, 'DICTAV') | |
}) | |
it('has no SEVERE error', () => { | |
browser.call(function() { | |
// wait 500msec to load js | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve() | |
}, 500) | |
}) | |
}) | |
try { | |
// Because `log/types` is not webdriver specification, the exception is occured on cloud | |
const errors = browser.log('browser').value | |
for (var i = 0; i < errors.length; i++) { | |
var err = errors[i] | |
assert (err.level !== 'SEVERE', err.message) | |
} | |
} catch(err) { } | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment