Skip to content
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

Open
wants to merge 12 commits into
base: 3.x
Choose a base branch
from

Conversation

thomashohn
Copy link
Contributor

Motivation/Description of the PR

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@thomashohn
Copy link
Contributor Author

@kobenguyent - did some initial work here - some tests still might need to be adapted - will see if I find the time for that

@thomashohn
Copy link
Contributor Author

@kobenguyent Fixed some of the tests feel free to pick up on the last ones

@@ -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')
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bump webdriverio from 8.40.6 to 9.2.12
2 participants