MinkSelenium2Driver icon indicating copy to clipboard operation
MinkSelenium2Driver copied to clipboard

W3C Compatability Fixes

Open justafish opened this issue 1 year ago • 10 comments

Fixes to enable compatibility with WebDriver.

Here are the modifications running against the full set of Drupal core tests: https://github.com/Lullabot/drupal-webdriver/pull/2

To run against newer browsers/versions of selenium that have dropped support for json wire, a drop-in replacement library for instaclick/php-webdriver is needed (this is intended to null any disruption for existing test setups, but projects using instaclick/php-webdriver are currently stuck on selenium versions over a year old). Here's the replacement library, along with these proposed changes, run against the Drupal core tests as above: https://github.com/Lullabot/drupal-webdriver/pull/1

Related drupal.org issue https://www.drupal.org/project/drupal/issues/3240792 Fixes #293

justafish avatar Oct 03 '23 11:10 justafish

Codecov Report

Merging #372 (8371ae4) into master (5d27505) will increase coverage by 2.79%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #372      +/-   ##
============================================
+ Coverage     89.97%   92.77%   +2.79%     
- Complexity      168      193      +25     
============================================
  Files             1        1              
  Lines           469      595     +126     
============================================
+ Hits            422      552     +130     
+ Misses           47       43       -4     
Files Coverage Δ
src/Selenium2Driver.php 92.77% <100.00%> (+2.79%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 03 '23 12:10 codecov[bot]

tests were initially failing as isW3C() is only available in the main branch of instaclick/php-webdriver https://github.com/instaclick/php-webdriver/blob/master/lib/WebDriver/Session.php#L136

justafish avatar Oct 03 '23 12:10 justafish

See https://github.com/minkphp/webdriver-classic-driver for our in-progress work on implementing a new WebDriver-based driver for Mink (for now, all the initial implementation is in a PR, not yet in the main branch).

stof avatar Oct 03 '23 12:10 stof

@stof ah interesting :smile_cat: :+1:

Would you please consider accepting this change into this project in the meantime? It's a small update, not disruptive to existing users, is successfully running over Drupal core's extensive tests, and will allow projects to get off > 1 year old browsers for testing without waiting for the new project to be finished and released

justafish avatar Oct 03 '23 12:10 justafish

@stof thanks for the review! I'll address the issues you've raised

justafish avatar Oct 03 '23 13:10 justafish

@stof ready for review! I'll wait on making a release of lullabot/php-webdriver until this PR is happy

justafish avatar Oct 05 '23 17:10 justafish

@justafish this looks great. It'd be nice to run Drupal's tests against firefox and other browsers at last. @stof is there scope to merge this as a stop gap until the work on https://github.com/minkphp/webdriver-classic-driver is complete?

alexpott avatar Oct 17 '23 09:10 alexpott

Hi @stof - could you please let me know if the project is willing to accept this PR so I can make a release of php-webdriver? We can move Drupal to a fork of this package if necessary, but I would prefer to continue collaborating here :smile_cat:

justafish avatar Dec 07 '23 12:12 justafish

Is this PR still make sense?

andypost avatar Feb 22 '24 00:02 andypost

If https://github.com/minkphp/webdriver-classic-driver solves this PR needs, then probably not.

aik099 avatar Feb 22 '24 09:02 aik099