Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

Implementation of WebDriverManager #786

Merged
merged 28 commits into from
Oct 14, 2021

Conversation

FermJacob
Copy link
Collaborator

@FermJacob FermJacob commented Aug 24, 2021

Closes #781
Closes #680

@FermJacob FermJacob requested a review from a team August 24, 2021 03:28
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

77.8% 77.8% Coverage
0.0% 0.0% Duplication

@FermJacob
Copy link
Collaborator Author

@FermJacob
Copy link
Collaborator Author

FermJacob commented Oct 6, 2021

Add additional unit tests to load all browsers and validate functionality on SeleniumConfig tests
Downgrade GhekoDriver version

@@ -223,6 +230,7 @@ public static IWebDriver GetFirefoxDriver(TimeSpan commandTimeout, FirefoxOption
{
return CreateDriver(() =>
{
new DriverManager().SetUpDriver(new FirefoxConfig());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do this every single time we create a new driver?
Feels like we could just do it once.

I see 2 problems with this implementation.

  1. We pay a small cost for every single test
  2. If the remote gecko host (AKA where WebDriverManager downloads the driver from) goes done at any point in our test run we will likely start failing tests.

@@ -248,6 +256,7 @@ public static IWebDriver GetEdgeDriver(TimeSpan commandTimeout, EdgeOptions edge
{
return CreateDriver(() =>
{
new DriverManager().SetUpDriver(new EdgeConfig());
var driver = new EdgeDriver(GetDriverLocation("MicrosoftWebDriver.exe", GetProgramFilesFolder("Microsoft Web Driver", "MicrosoftWebDriver.exe")), edgeOptions, commandTimeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work nicely outside windows.
Think :
var driver = new EdgeDriver(EdgeDriverService.CreateChromiumService() , edgeOptions, commandTimeout);
may work better.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

91.9% 91.9% Coverage
0.0% 0.0% Duplication

@TroyWalshProf TroyWalshProf merged commit 841b6b1 into master Oct 14, 2021
@TroyWalshProf TroyWalshProf deleted the feature/JacobFerm/WebDriverManager branch October 14, 2021 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement WebDriverManager.Net Support for Edge Chromium
2 participants