Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lib/helper/Puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3216,14 +3216,18 @@ async function proceedSee(assertType, text, context, strict = false) {
let description
let allText
if (!context) {
let el = await this.context
if (this.withinLocator) {
let el = await this.context

if (el && !el.getProperty) {
// Fallback to body
el = await this.context.$('body')
}
if (el && !el.getProperty) {
el = await this.context.$('body')
}

allText = [await el.evaluate(node => node.innerText)]
allText = [await el.evaluate(node => node.innerText)]
} else {
const ctx = await this._getContext()
allText = [await ctx.evaluate(() => document.body.innerText)]
}
description = 'web application'
} else {
const locator = new Locator(context, 'css')
Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ Scenario('change config 6 @WebDriverIO @Puppeteer @Playwright @Obscura', ({ I })

Scenario('simple page test @WebDriverIO @Puppeteer @Playwright @Obscura', ({ I }) => {
I.amOnPage('https://example.com')
I.see('Example Domain')
I.seeInTitle('Example Domain')
})
Loading