Giter Club home page Giter Club logo

webdrivermanager.net's Introduction

webdrivermanager.net's People

Contributors

alexeypato avatar anebot avatar brondavies avatar dependabot-preview[bot] avatar dependabot[bot] avatar dspaul avatar fermjacob avatar fmoliveira avatar garry-edmonds avatar iouym avatar jerone avatar jgelon avatar kyle-seongwoo-jun avatar mhx8 avatar n-ski avatar niklausburren avatar ron-macneil-youi avatar rosolko avatar sarahelsaig avatar sbonds avatar sinanerkan avatar stanlylife avatar timotei avatar troywalshprof avatar tteguayco avatar vitaliydavydiak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webdrivermanager.net's Issues

Firefox & Opera error

With the drivers Firefox and Opera, I get this error:

The request was aborted: Could not create SSL/TLS secure channel.

Firefox

Firefox isn't working anymore

Message: System.NullReferenceException

Access to nonexistent path?

When I try to use WebDriverManager as follows:

public static void Initialize()

    {
        new DriverManager().SetUpDriver(new ChromeConfig());
        Instance = new ChromeDriver();
    }

I get this error message:

Message: System.UnauthorizedAccessException : Access to the path 'D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Chrome\2.36\X64' is denied.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

The Chrome folder does not exist. Is there a way around this?

Target Framework

Is it possilbe to set the target framework to 4.0 or 4.5? I don't want to force everybody using my application to download the latest framework.

FirefoxConfig

https://github.com/mozilla/geckodriver/releases/download/v<version>/geckodriver-v<version>-win64.zip

Latest version is v0.19.1

https://github.com/mozilla/geckodriver/releases/download/vv0.19.1/geckodriver-vv0.19.1-win64.zip
^This will not work

New Microsoft Edge Browser doesn't work

I tried to use your library to create driver for new Microsoft Edge browser and get following error:

: OpenQA.Selenium.DriverServiceNotFoundException : The MicrosoftWebDriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://go.microsoft.com/fwlink/?LinkId=619687.

My code is very simple:

        new DriverManager().SetUpDriver(new EdgeConfig());
        return new EdgeDriver();

I guess that main issue in name of the file - it should be msedgedriver.exe

Could you fix it?

FirefoxConfig cannot download driver.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using WebDriverManager.DriverConfigs.Impl;
using WebDriverManager;

namespace ConsoleApp9
{
    class Program
    {

        static void Main(string[] args)
        {
            new DriverManager().SetUpDriver(new FirefoxConfig());
            IWebDriver driver = new FirefoxDriver();

            driver.Navigate().GoToUrl("http://google.com");
            driver.Quit();

        }

    }
}

Issue at line 18 (FirefoxConfig()): System.IO.InvalidDataException: 'End of Central Directory record could not be found.'

Use the latest non-canary release for Edge

The "latest" version for all supported browsers is the latest released version on the main channel. For Edge it's the canary channel which is not something that you'd usually have installed if you're actually using Edge. So I suggest using the release version of Edge too as the "latest".

Error FireFox

Message: System.InvalidOperationException : Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line (SessionNotCreated)

Linux support?

Hello.

If I run code with tests on Linux using mono, I get an error.

Code example:

[Test]
public void Test()
{
    new WebDriverManager.DriverManager().SetUpDriver(new ChromeConfig());
    var driver = new ChromeDriver();
    driver.Navigate().GoToUrl("http://google.com");
}

Error:

1) Error : DebugTestProject.Class1.Test
OpenQA.Selenium.DriverServiceNotFoundException : The chromedriver file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html.
  at OpenQA.Selenium.DriverService.FindDriverServiceExecutable (System.String executableName, System.Uri downloadUrl) [0x00031] in <f1eeb9ff2715446ba5ead56f31989824>:0
  at OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService () [0x00005] in <f1eeb9ff2715446ba5ead56f31989824>:0
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor (OpenQA.Selenium.Chrome.ChromeOptions options) [0x00000] in <f1eeb9ff2715446ba5ead56f31989824>:0
  at OpenQA.Selenium.Chrome.ChromeDriver..ctor () [0x00006] in <f1eeb9ff2715446ba5ead56f31989824>:0
  at DebugTestProject.Class1.Test () [0x00018] in <3c1e2045a44a474ea6317ee22dca34d8>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in <3833a6edf2074b959d3dab898627f0ac>:0

You can simple check what OS is used by calling RuntimeInformation.IsOSPlatform(OSPlatform.Linux)

FireFoxDriverManager exception

Unhandled Exception: WebDriverManager.Helpers.WebDriverManagerException: Error occurred during adding(updating) browser driver environment variable ---> System.Security.SecurityException: Requested registry access is not allowed.

Not works with latest version of Windows Edge.

The Lasted_stable version of Edge webdriver (85.0.564.60) is only available for the Mac platform.
Since SetUpDriver's version parameter is set to Latest, the generated download link is wrong for Windows platforms, so a 404 error code is returned.

Proposed solution:
I can understand that due automatically updates the version parameter is set to Latest, but from my point of view, pointing to MatchingBrowser would provide a more robust solution.

Artur.

Unable to use Firefox driver on Linux and Mac Os

Hi

With the current implementation, it’s not possible for us to run a Firefox driver on Linux and Mac Os machines.

In order for the correct driver to download, you need to update FirefoxConfig class as ChromeConfig for example and add a method for unzipping * .tar.gz archives to BinaryService class.

This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)

Description of the problem :
I am using webdrivermanager to manage chromedriver.exe. When I execute the code the following message was displayed in the console
Error Message:
OneTimeSetUp: System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)

Browser and version :
Google Chrome Version 85.0.4183.102 (Official Build) (64-bit)

Operating system :
Windows 10 Enterprise

WebDriverManager version :
2.9.3

ChromeWebdriverManager fails with Exception

For ChromeWebdriverManager got exception at the very beginning:

Unhandled Exception: WebDriverManager.Helpers.WebDriverManagerException: Error occurred during browser driver archive downloading ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

Microsoft Edge. 'MicrosoftWebDriver.exe file does not exist.' Exception

It seems the name of the driver has changed and it doesn't match which the expected by the lib.

The MicrosoftWebDriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://go.microsoft.com/fwlink/?LinkId=619687

At this moment, you have to rename the file manually to get it working...

MicrosoftWebDriver.exe is not found

When using DriverManager().SetUpDriver(new EdgeConfig()); the Microsft Edge Driver executable is being downloaded as msedgedriver.exe.

The Microsoft.Edge.SeleniumTools packages EdgeDriver class expects the exe to be named MicrosoftWebDriver.exe and thus does not find the executable and an exception is thrown.

Microsoft.Edge.SeleniumTools version 3.141.2
WebDriverManager version 2.9.3

Match browser version

Does this try to match the chrome version installed? For example build servers on azure have updated chrome unexpectedly. In that case it would be awesome if the manager tried to download the matching driver.

Manager downloads only latest version of the driver for Edge

I tried to run some tests on Windows 10 (I`m before upgrade), so the correct version of driver for my system is the one labeled "Release 14393" on Microsoft's site

I tried to choose the right version using:
new DriverManager().SetUpDriver(new EdgeConfig(), "3.14393");

When I tried to run some tests using the driver a strange error about msldso.dll missing is shown (I googled that, it's related to wrong version of the driver being used. It seems that similar project but for Java has similar issue )

Driver is downloaded into "Edge\3.14393\X64" folder. Right clicking on a downloaded file and going to the details tab reveals that file version is 10.0.15063.0. so that's part of the newer driver from "Release 15063"

From what I've seen in EdgeConfig.cs versions and download urls are taken from the Microsoft site. We have all version numbers and download links but we're taking only first (latest) one.

Since Edge config doesn't use the "" markers in urls, these are not altered by UrlHelper when manager tries to get the right download URL.

I was able to use desired version of the driver by configuring it manually:

new DriverManager().SetUpDriver(
                        "https://download.microsoft.com/download/3/2/D/32D3E464-F2EF-490F-841B-05D53C848D15/MicrosoftWebDriver.exe", 
                        Path.Combine(Directory.GetCurrentDirectory(), "Edge", "3.14393", "X64", "MicrosoftWebDriver.exe"),
                        "MicrosoftWebDriver.exe"
                        );

So I`m kindly asking for a support for selecting Edge driver versions in an simpler way.

Latest Chrome release is beta

The https://chromedriver.storage.googleapis.com/LATEST_RELEASE URL currently returns 85.0.4183.38 but that's actually the beta version of Chrome, the currently latest released version is 84.0.4147.89. Maybe a similar issue to #74? Or this is actually a ChromeDriver bug, as https://chromedriver.chromium.org/downloads/version-selection says

In addition, the version of ChromeDriver for the current stable release of Chrome can be found at https://chromedriver.storage.googleapis.com/LATEST_RELEASE. However, using on this file may be less reliable than methods described above.

Chromedriver launch failing after updating to v80

As soon as Chrome updated automatically to v80 Webdriver manager is failing to launch instance. I reverted back to v79 and things started working fine again. But unfortunately due to company policy chrome automatically updates again to v80 and results in failure.

public IWebDriver GetDriver()
{
    new DriverManager().SetUpDriver(new ChromeConfig());
    _chromeDriverService = ChromeDriverService.CreateDefaultService();
    _chromeDriverService.HideCommandPromptWindow = true;
    ChromeOptions options = new ChromeOptions();
    options.AddArgument("--log-level=3");
    _webDriver = new OpenQA.Selenium.Chrome.ChromeDriver(_chromeDriverService, options);
    _webDriver.Manage().Window.Maximize();

    return _webDriver;
}

Download WebDriver version matching with browser version

Hello,

For Google Chrome, I have noticed that the library downloads the WebDriver for the latest version if we use the automatic mode (given by the URL https://chromedriver.storage.googleapis.com/LATEST_RELEASE) or also a specific version that we can specify if using the manual way.

My question is, could we implement a third way that downloads the WebDriver version that matches the Google Chrome version installed in the machine? For example, if the Chrome version installed in the machine is 81.0.4044.**, then chromedriver.exe with version81.0.4044.138 is installed (last ChromeDriver version to work with Chrome 81, according to https://chromedriver.chromium.org/downloads).

Can't run tests in parallel using WebDriverManager

My project using Selenium + MSTest. Until now, I used the chromedriver from the nuget package and the tests are running perfectly in parallel.
I tried to use WebDriverManager instead of the chromedriver nuget package - when I run 1 test, everything works correctly. But when I trying to run tests in parallel (even 2 tests), one of the tests fails immediately and the 2nd test continue and running OK. It seems that the first test using the chromedriver and then the 2nd test can't use it too, so it fails:

System.ComponentModel.Win32Exception: 'The process cannot access the file because it is being used by another process'

Am I missing something? does WebDriverManager supports parallel run?
You can see the code in the attachment.

Thanks

WhatsApp Image 2020-01-07 at 16 36 58

Check browser version too

The Java WebDriverManager also checks the version of the installed browser, I'd guess to use a compatible driver, even if it's not the latest. It seems to me that this library doesn't do that, so it would be great if you could add this feature too.

Thank you for considering my suggestion.

Driver Download

Hi, my question is to understand the purpose of your project is to download the chrome driver, edge and others if not, right?

But I'm trying to use it, but I'm trying this return when using EdgeDriver:

OpenQA.Selenium.DriverServiceNotFoundException: The MicrosoftWebDriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://go.microsoft.com/fwlink/?LinkId=619687.

Note: I have Edge installed on my machine.

Download chromedriver

I'm having an issue when I try to start the app in a server it throws this error: "Access to the path 'C:\Windows\system32\Chrome\84.0.4147.30\X64' is denied" however we gave permissions to the user in that path and it still throwing the same error.

Cross-Platform .NET Core Support

I was about to write a similar package (inspired by the Java package of the same name, which it looks like you've taken a similar direction), but then I came across this project. Awesome!

So Selenium is on the brink of getting .NET Core support. There is an open pull request (SeleniumHQ/selenium#2269) and a preview package is available on NuGet (https://www.nuget.org/packages/CoreCompat.Selenium.WebDriver/2.54.0-beta002). I am proposing cross-platform (Windows, Mac OS, Linux) .NET Core support for WebDriverManager.NET.

I'm still very new with .NET Core and I've only glanced at this code, but I believe the bulk of the necessary changes would be (in no particular order):

  • Migrate to newer .NET Core project structure (project.json).
  • WebDriverManager.Services.Impl.VariableService will need to implement platform-specific path manipulation for Linux and Mac; rename/refactor the existing Windows implementation.
  • WebDriverManager.DriverConfigs.IDriverConfig implementations will need to be platform-agnostic. I would propose that the existing classes (ChromeConfig, FirefoxConfig, etc) should be responsible for detecting the runtime platform and transforming results as necessary. For example, the binary name on Mac/Linux would not end in ".exe", among other differences.
  • Perhaps make a PlatformHelper/Service to aid with the previous bullet point?
  • Probably more, but this is what I came up with on first glance.

Let me know what you think. I'd love to help out. Thanks!

Adding Appium to the list of Drivers

I've forked the project in order to add Appium to the set of drivers available. The project is hosted on bitbucket just like the phantomjs driver. The only difference is that the file name is like AppiumForWindows_1_4_16_1.zip instead of phantomjs-1.1.1.zip and i'm using the same code from the phantomjs driver with little modification which is the url in the configuration and it always seems to fail. I've been able to modify the code to get it too download the first image but never the latest version.

 WebDriverManagerConfig config = new WebDriverManagerConfig
        {
            binary = "Appium.exe",
            url = "https://bitbucket.org/appium/appium.app/downloads/AppiumForWindows_<version>.zip",
            pathVariable = "Appium.binary.path",
            architecture = Architecture.x32.ToString().Replace("x", "")
        };

        public string GetLatestVersion()
        {
            try
            {
                using (WebClient client = new WebClient())
                {
                   string version = null;
                    var doc = new HtmlDocument();
                    var htmlCode = client.DownloadString("https://bitbucket.org/appium/appium.app/downloads");
                    doc.LoadHtml(htmlCode);
                    var itemList = doc.DocumentNode.SelectNodes("//tr[@class='iterable-item']/td[@class='name']/a").Select(p => p.InnerText).ToList();
                    version = itemList.FirstOrDefault().Split('_')[1];
                    if (version != null || version != string.Empty)
                        Log?.Info($"Latest appium driver version is '{version}'");
                    else
                        Log?.Warn($"Problem with getting latest appium driver version. Parsed version is '{version}'");
                    return version;
                }
            }
            catch (Exception ex)
            {
                Log?.Error(ex, "Error occurred during getting last appium driver version");
                throw new WebDriverManagerException("Error occurred during getting last appium driver version", ex);
            }
        }

Any help would be appreciated.

WebdriverManager for firefox throws System.Net.WebException: Could not create SSL/TLS secure channel, in MS test agents and build deployed through jenkins

When we tried to run our scripts on Test agents through Jenkins, we are encountering an issue with firefox and an issue as follows:
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.

Tests are run in batch , with first test we see the above error and rest of the test scripts have two kinds of errors like above error and also System.NullReferenceException: Object reference not set to an instance of an object.

When we checked bin folder in test agent , firefox driver is not downloading. We ran the test scripts via command prompt, test scripts are running(firefoxdriver downloaded).

Our code :
new WebDriverManager.DriverManager().SetUpDriver(new FirefoxConfig(), version: driverVersion);
Driver = new FirefoxDriver(FirefoxDriverService.CreateDefaultService(), options, TimeSpan.FromSeconds(60)));

Note : When we run locally, we are not facing this issue.

Appreciate your response ASAP. As we have implemented webdriverManager on large scale scripts on different products

Unable to add the nuget package in solution done in .net framework 4.7.2

Hi,

I'm unable to add the nuget package for a solution done in .net framework 4.7.2. Please advice.
Following is the error i'm getting

Install-Package : Could not install package 'WebDriverManager 2.7.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are
compatible with that framework. For more information, contact the package author.
At line:1 char:

Exception with Edge Chromium

First of all, thank you for the library!

I have an issue with Edge (using the latest 2.9.1 version of the library). The following code:

 new DriverManager().SetUpDriver(new EdgeConfig());
var driver = new EdgeDriver();

...throws this exception:

System.Exception : Creating the web driver failed with the message "The MicrosoftWebDriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://go.microsoft.com/fwlink/?LinkId=619687."

Chrome, Firefox, IE work. The driver exe is actually downloaded to Edge\85.0.529.0\X64.

Maybe related to but not the same as (because it's already fixed) #62.

Add to PATH functionality working weird.

Seems like we can't property update PATH environment.

Preconditions:

  1. When i create environment variable for some driver and call it in accordance with them, for example chrome: webdriver.chrome.driver
  2. Insert some path to variable, eg: D:\some\path\on\disk\
  3. Before adding %webdriver.chrome.driver% variable to PATH I'm getting value from PATH.

Issue:
I'm getting value from PATH using command Environment.GetEnvironmentVariable("PATH");.
And as result I'm getting value with full added pathes instead of shorted.

Expected value from PATH:
...%docker%\bin;%webdriver.chrome.driver%

Actual value from PATH:
C:\ProgramFiles\Docker\Docker\Resources\bin;D:\work\git\WebDriverManager.Net\WebDriverManager.Tests\bin\Debug\Drivers\chromedriver\2.22\32

Result:
I'm not able to property update PATH variable because of all parameters from value are extended for full paths.

InvalidOperationException: This version of ChromeDriver only supports Chrome version X (SessionNotCreated)

InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)

I am fairly new to web scraping, especially with web drivers. However, I have searched far and wide for a solution to the ChromeDriver compatibility issues and it seems like this package should fix that issue. As I am still receiving the same error and could not find a solution in the "docs" to this package I decided to post an issue and see if anyone could help.


My main lines of code are

			**new DriverManager().SetUpDriver(new ChromeConfig());**
			var chromeoptions = new ChromeOptions();
			var seleniumConfigService = new SeleniumConfigService();
			chromeoptions = seleniumConfigService.SetDefaultChromeConfig(chromeoptions);
			var driver = new ChromeDriver(chromeoptions);

the project file can be found Here


and the error still persists:

InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
System.InvalidOperationException: session not created: This version of ChromeDriver only supports Chrome version 83 (SessionNotCreated)
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
   at web_scraper.Interfaces.JobRetrievers.JobregScraper.CheckForUpdates(Boolean checkCategories) in C:\Users\stian\Documents\.VS CODE\. Net\web_scraper\Interfaces\JobRetrievers\JobregScraper.cs:line 57
   at web_scraper.Controllers.JobregWebScraperController.GetAsync() in C:\Users\stian\Documents\.VS CODE\. Net\web_scraper\Controllers\JobregWebScraperController.cs:line 38
   at lambda_method(Closure , Object )
   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

ChromeOptions

how do we pass in chromeoptions to we use the chromeconfig?

InternetExplorerConfig cannot download driver

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebDriverManager;
using WebDriverManager.DriverConfigs.Impl;
using WebDriverManager.Helpers;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            new DriverManager().SetUpDriver(new InternetExplorerConfig(), "Latest");
        }
    }
}

Issue when getting the Internet Explorer driver:

System.Net.WebException: 'The remote server returned an error: (404) Not Found.'

Looking further into it the URL isn't being created properly - it's looking for

http://selenium-release.storage.googleapis.com//IEDriverServer_Win32_.0.zip

Missing is the release number.

Seems the code that pulls the current version from the selenium page is working (returning 3.13.0 as of June 2018) but then somehow it doesn't get added into the URL correctly.

FirefoxConfig() returns "The remote server returned an error: (404) Not Found."

I am not doing anything fancy. My implementation is straightforward:
`var driverManager = new DriverManager();

        if (isMozillaEnabled)
        {
            driverManager.SetUpDriver(new FirefoxConfig());

            FirefoxOptions firefoxOptions = GetFirefoxOptions();
            return new FirefoxDriver(firefoxOptions);
        }`

At driverManager.SetUpDriver(new FirefoxConfig()); I am getting the: "The remote server returned an error: (404) Not Found."

May be the problem is with me because at one point it was working correctly.

After trying all sorts of thing and nothing helped I debugged the WebDriverManager project and I noticed that GetLatestVersion() returns .27.0 instead of 0.27.0.
And because of that the URL is:
https://github.com/mozilla/geckodriver/releases/download/v.27.0/geckodriver-v.27.0-win64.zip
instead
https://github.com/mozilla/geckodriver/releases/download/v0.27.0/geckodriver-v0.27.0-win64.zip

If I did something wrong sorry for the Issue and please tell me what I have to do to fix it, but it seems to me that is not the case.

Unable to Open Config file:"End of Central Directory record could not be found"

Getting following error while trying to utilize Webdriver Manager
new DriverManager().SetUpDriver(new ChromeConfig()), failed to open ChromeConfig() and got following error
"An exception of type 'System.IO.InvalidDataException' occurred in System.IO.Compression.FileSystem.dll but was not handled in user code"
Unzip software is WinRAR

Your help will be apprecaited
Thanks

Does WebDriverManager-C# code support for Edge Chromium??

I installed 2.19 web driver manger with my project.
I want to run the scripts in Edge chromium.
When I use below code, i am getting webexcetion -Unknown error
Code:

var edgeOptions = new EdgeOptions()
    {
            PageLoadStrategy = PageLoadStrategy.Eager
    };
edgeOptions.AddAdditionalCapability("acceptInsecureCerts", false);
edgeOptions.AddAdditionalCapability("isLegacy", false);
new WebDriverManager.DriverManager().SetUpDriver(new EdgeConfig(), version: "82.0.432.0");
Driver = new EdgeDriver(EdgeDriverService.CreateDefaultService(), edgeOptions, TimeSpan.FromMinutes(1));

Non chromium edge

Hi, the latest version gets the edge driver URLS from the new pool of urls...
https://msedgedriver.azureedge.net/

But I still need to access the original ones. I'm just using a direct download link in SetupDriver, that I determine by the OS version.
new DriverManager().SetUpDriver(
GetMicrosoftEdgeDownloadLink(version),
Path.Combine(Directory.GetCurrentDirectory(), "Edge", GetEdgeWebDriverVersion(version), "X64", "MicrosoftWebDriver.exe"),
"MicrosoftWebDriver.exe"
);

Ie, I end up passing in
"https://download.microsoft.com/download/3/4/2/342316D7-EBE0-4F10-ABA2-AE8E0CDF36DD/MicrosoftWebDriver.exe"

So basically, in the BinaryService.cs, I need it to copy the file over when it is an exe. Currently it only copies it to my working directory if its a .zip, and goes through the Unzip method.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.