-
-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump webdriverio to v9 #4594
base: 3.x
Are you sure you want to change the base?
Bump webdriverio to v9 #4594
Conversation
@kobenguyent - did some initial work here - some tests still might need to be adapted - will see if I find the time for that |
@kobenguyent Fixed some of the tests feel free to pick up on the last ones |
lib/helper/WebDriver.js
Outdated
@@ -2569,16 +2569,20 @@ class WebDriver extends Helper { | |||
async switchTo(locator) { | |||
this.browser.isInsideFrame = true | |||
if (Number.isInteger(locator)) { | |||
return this.browser.switchToFrame(locator) | |||
// @TODO construct array of iFrames and pick "index" | |||
let locator1 = new Locator('//iframe[@id="number-frame-1234"]', 'xpath') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we forgot to adjust this hardcoded id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to fetch a list of iframes dynamically and then fetch the corresponding index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I'm not having much knowledge on this, but I guess, we shall query the iframe based on the passed locator and switch to that frame if found, otherwise, we shall throw an error as no frame to switch to, what do you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The locator passed is a number i guess in previous versions that what have returned the frame with that index - we might need to either investigate if this should be possible in the new version or not. Could not find a method to get all iframes on a page - yop might now a way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://codecept.io/helpers/WebDriver/#switchto looks like it's either a locator or nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I guess it should be adapted to that together with the tests - I could do that
Motivation/Description of the PR
Applicable helpers:
Applicable plugins:
Type of change
Checklist:
npm run docs
)npm run lint
)npm test
)