Skip to content

WebDriver (WebDriverIO 5) scrollTo does not work due to deprecated API #1517

Closed
@elukoyanov

Description

@elukoyanov

What are you trying to achieve?

Run test with scrollTo on safari 12 and firefox 65 with WebDriver helper (WebDriverIO 5)

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

TypeError: this.browser.getElementLocation is not a function
      at WebDriver.scrollTo (node_modules/codeceptjs/lib/helper/WebDriver.js:1248:43)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:229:7)

Details

  • CodeceptJS version: 2.0.4
  • NodeJS Version: 8.14.3
  • Operating System: MacOS High Sierra
  • WebDriver

It's all about WebDriverIO 5 breaking changes:
const location = await this.browser.getElementLocation(elementId);
getElementLocation was deprecated. element.getLocation should be used now.
https://webdriver.io/docs/api/element/getLocation.html

I have a variant to fix it. But will do it in a few days, if someone will not do it earlier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions