Status: Development in progress
Affects Version/s: 3.5.8, 3.6.6, 3.7, 3.8, 3.9
Fix Version/s: None
Component/s: Automated functional tests (behat)
Affected Branches:MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
Pull from Repository:
Pull Master Branch:MDL-66979-master
Pull Master Diff URL:
(note there are a bunch of intermediate layers involved, but this is a brief history to make it all understandable)
Behat, in order to control real browsers with Selenium has been using the called "JsonWire" protocol (invented by Selenium). That protocol provided a standard API to navigate, click type... control the browser, basically. And browsers had support for it (receiving the commands and performing the actions).
That "JsonWire" has evolved into a new, standard new API, called the "W3C protocol" that, while shares many of the concepts with its ancestor, it's not compatible with it and does things differently.
And the trend is to support the W3C protocol everywhere, with the old one being phased out / deprecated by all browsers.
Right now, support for the old (JsonWire) and new (W3C) protocols are as follow:
- Firefox: Old protocol was supported until 2.53.1. All versions after that one do use, exclusively, the new W3C protocol.
- Chrome: It still supports both protocols, but recently switched the default to W3C, and clearly it's going to be the one remaining.
- Edge, Safari...: In theory, they only support the W3C protocol (in theory because we have not been able to test them ever, exactly because we are missing W3C support).
Basically, and as commented above, we use Behat, that uses Mink, that uses some low level drivers and our own moodle behat extension. And that stack is missing support for the new W3C protocol.
We need to ensure that the whole stack is W3C compatible to get this done. And some of the pieces (mink, low level drivers...) aren't progressing as it should be desired. Without them, we hardly can try/perform the switch.
So right now we are using an old Firefox version (2.53.1) - that is lacking some good JS standards support and current Chrome with the protocol forced to the old "JsonWire" one.
And we are monitoring ongoing issues @ both mink and instaclick projects to see if there is any progress there:
- mink-selenium: https://github.com/minkphp/MinkSelenium2Driver/issues/293
- instaclick php-webdriver (that we have forked): https://github.com/instaclick/php-webdriver/issues/84
- facebook php-wedriver (we don't use this, but it's an alternative to the previous one): https://github.com/facebook/php-webdriver/issues/657
And that's basically, the problem. This issue is a container to add all the related information and updates we gather out there and plan which actions to perform once the goal (switch to W3C protocol) was possible.