After reviewing the documentation, I am confident that this code should work correctly. However, I am encountering an issue where something needs to run once the expect has finished, but it doesn't seem to be functioning as expected.
Functioning Code
browser
.url('https://www.google.co.uk/?')
.expect.element('.Google Search').value.to.contain('Dashboard')
.perform(function() {
console.log('elementValue');
})
Not Working Properly
browser
.url('https://www.google.co.uk/?')
.expect.element('.Google Search').value.to.contain('Dashboard')
.perform(function() {
console.log('elementValue');
})
Error encountered while using the perform command: browser.moveToElement(...).doubleClick(...).setValue(...).click(...).expect.element(...).text.to.contain(...).perform is not a function