titusfortner / webdrivers

Keep your Selenium WebDrivers updated automatically
MIT License
593 stars 111 forks source link

Initial addition of Edge Chrome to webdrivers #128

Closed twalpole closed 5 years ago

twalpole commented 5 years ago

This adds support for Chromium based Edge and downloading of msedgedriver - It doesn't yet find Edge on windows -- If anyone happens to know where we should be looking for it on windows I'd love to know :). The support currently depends on a current draft PR on selenium-webdriver.

kapoorlakshya commented 5 years ago

@twalpole Here is what I have on Windows 10:

Dev: C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe

Canary: C:\Users\Lakshya Kapoor\AppData\Local\Microsoft\Edge SxS\Application\msedge.exe

twalpole commented 5 years ago

@kapoorlakshya I updated with the windows locations. Could you please give it a try and see if it works properly for you.

kapoorlakshya commented 5 years ago

Yeah, I'll check it out tonight and get back to you.

kapoorlakshya commented 5 years ago

Nice! The updated EdgeFinder for Windows is able to find the binaries for both Dev:

2019-06-10 23:16:36 DEBUG Webdrivers making System call: powershell (Get-ItemProperty 'C:\Program Files (x86)\\Microsoft\Edge Dev\Application\msedge.exe').VersionInfo.ProductVersion
2019-06-10 23:16:36 DEBUG Webdrivers Browser version: 76.0.176.1

and Canary:

2019-06-10 23:31:17 DEBUG Webdrivers making System call: powershell (Get-ItemProperty 'C:\Users\Skittles\AppData\Local\\Microsoft\Edge SxS\Application\msedge.exe').VersionInfo.ProductVersion
2019-06-10 23:31:17 DEBUG Webdrivers Browser version: 77.0.186.0

with Canary being found first, as expected, based on the code.

Please note that this will require fix 1. and 2. from PR #131. The binary location based tests are failing because of path separator issues on Windows:

1) Webdrivers::Edgedriver#driver_path returns full location of binary
     Failure/Error: expect(edgedriver.driver_path).to match("#{File.join(ENV['HOME'])}/.webdrivers/msedgedriver")
       expected "C:/Users/Skittles/.webdrivers/msedgedriver.exe" to match "C:\\Users\\Skittles/.webdrivers/msedgedriver"
     # ./spec/webdrivers/edgedriver_spec.rb:257:in `block (3 levels) in <top (required)>'

For some reason they are passing on Appveyor (Windows Server 2012), but failing on Windows 10 for me.

twalpole commented 5 years ago

@kapoorlakshya I believe the appveyor config isn't actually setup to test with the selenium-webdriver master branch gemfile so all these tests would actually get skipped on there.

kapoorlakshya commented 5 years ago

@twalpole I was referring to the location based tests for other drivers. I ran the edgedriver specs locally. Sorry about the confusion.

twalpole commented 5 years ago

@kapoorlakshya Do you know if it's possible to tell Appveyor to install the Chromium based Edge on the system so the build will pass?

kapoorlakshya commented 5 years ago

@twalpole Yeah, I just pushed 493d020f5723a6739de819432427117073e9bd07 that installs the Dev and Canary versions. Feel free to tweak it as needed :)

twalpole commented 5 years ago

@kapoorlakshya Thank you very much.