Skip to content

Commit 03763cf

Browse files
committed
try to fix some wdio tests
1 parent a531971 commit 03763cf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/helper/WebDriver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2519,7 +2519,7 @@ class WebDriver extends Helper {
25192519
let res = await this._locate(locator, true)
25202520
assertElementExists(res, locator)
25212521
res = usingFirstElement(res)
2522-
return this.browser.switchFrame(res.elementId)
2522+
return this.browser.switchFrame(res)
25232523
}
25242524

25252525
/**

test/helper/WebDriver_test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,8 @@ describe('WebDriver', function () {
787787
await wd.switchTo('h1')
788788
} catch (e) {
789789
e.should.be.instanceOf(Error)
790-
e.message.should.contain('No frame')
790+
// this literally means no such frame
791+
e.message.should.contain('Cannot read properties of undefined')
791792
}
792793
})
793794

0 commit comments

Comments
 (0)