1

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?

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64

2 Answers2

1

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.

Ondrej Machulda
  • 998
  • 1
  • 12
  • 24
0

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

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64