I have a button, it looks like this in HTML form
<span class="v-btn__content">Create</span>
My E2E Test, I am trying to click that Create
button
module.exports = {
'My first test case'(browser) {
browser
.url('http://localhost:8080/#/')
.waitForElementVisible('#app')
.waitForElementVisible('#input-10')
.waitForElementVisible('#input-13')
.setValue('#input-10', 'jdoe@email.com')
.setValue('#input-13', '**')
.click('.v-btn__content')
.assert.textContains('.v-toolbar__title','App')
.waitForElementVisible('.v-data-footer__pagination')
.waitForElementVisible('.v-btn__content')
.assert.textContains('.v-btn__content','Create')
.click('.v-btn__content','Create') ❌
}
}
I got
✖ Testing if element <.v-btn__content> contains text 'Create' in 5000ms - expected "contains text 'Create'" but got: "does not contain 'Create'" (5219ms)