skip to Main Content

in version php-webdriver 1.6 getLocationOnScreenOnceScrolledIntoView() is working fine, when currently I updated my version 1.8 it’s giving me an error:

FAILED: Exception occurred : unknown command: Cannot call non W3C
standard command while in W3C mode

why I get this error?

2

Answers


  1. Chosen as BEST ANSWER

    getLocationOnScreenOnceScrolledIntoView() is no longer supported in W3C WebDriver protocol

    I found an alternative solution for scroll, which works like this getLocationOnScreenOnceScrolledIntoView()

    $element = $driver->findElement($by);
    $action = new WebDriverActions($this->driver);
    $action->moveToElement($element);
    $action->perform();
    

    Note: It is available at version 1.8, will not work in php-webdriver 1.6


  2. This has been fixed in php-webdriver 1.11.1.

    It is true the method is not part of the W3C WebDriver protocol, but its behavior was re-implemented as a polyfill, so you can now use the getLocationOnScreenOnceScrolledIntoView() method both the old and the new protocol, without a need to change your code.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search