Giter Site home page Giter Site logo

Comments (7)

rosolko avatar rosolko commented on August 21, 2024

Unable to reproduce this bug.
Reproduce your code in a test, run it and it's works well.

My chrome has version - 80.0.3987.87 (Official Build) (64-bit)
Library download chromedriver with version - 80.0.3987.16

Can you please provide double-check that issue and provide more info.
Browser version, downloaded driver version and test logs with error stack trace.

from webdrivermanager.net.

roysouma avatar roysouma commented on August 21, 2024

Hi rosolko,

The error message is : Message = "session not created: This version of ChromeDriver only supports Chrome version 78 (SessionNotCreated)"

The stacktrace is as below:
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 ConsoleApp1.WebDriver.ChromeDriver.GetDriver() in C:\Users\roysouma\source\repos\TaxBotApp\ConsoleApp1\WebDriver\ChromeDriver.cs:line 102
at Tax_Tool.UserControlFlex.Worker_DoWork(Object sender, DoWorkEventArgs e) in C:\Users\roysouma\source\repos\TaxBotApp\ConsoleApp1\UserControlFlex.xaml.cs:line 109

My chrome version is 80.0.3987.87 and I checked the downloaded version is also correct in the path C:\Users\roysouma\source\repos\TaxBotApp\ConsoleApp1\bin\Debug\Chrome\80.0.3987.16\X64.

I'm also unable to figure out why this is happening as it is working fine with v79 and downloaded version is also fine as stated above.
Others in my team are also facing the same problem.

Also for your reference, this is my calling code:
var chromeDriver = new ChromeDriver();
try
{
var curDir = Directory.GetCurrentDirectory();
var webDriver = chromeDriver.GetDriver();
new Program(webDriver, ipObj).Start();
chromeDriver.Dispose();
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
throw;
}

and error is occuring at this line : var webDriver = chromeDriver.GetDriver();

Note: My selenium version is 3.141.0

from webdrivermanager.net.

roysouma avatar roysouma commented on August 21, 2024

Hi rosolko,

I unhid the command prompt and saw it is firing up old chrome driver:

Starting ChromeDriver 78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}) on port 58584
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

DevTools listening on ws://127.0.0.1:58588/devtools/browser/6bd47f37-28ab-4a33-8763-ea592ed58d4b

The bin folder C:\Users\roysouma\source\repos\TaxBotApp\ConsoleApp1\bin\Debug\Chrome has 3 chrome drivers: 78.0.3904.105, 79.0.3945.36 and 80.0.3987.16

from webdrivermanager.net.

roysouma avatar roysouma commented on August 21, 2024

packages.zip

Added a zip containing the csproj and packages file if you need.

from webdrivermanager.net.

roysouma avatar roysouma commented on August 21, 2024

Hi rosoljo,

I could debug the issue and find the root cause. The issue is occurring at line Environment.SetEnvironmentVariable(name, newPathVariable, EnvironmentVariableTarget.Process); in WebDriverManager. It is not throwing any error but also not adding to PATH. Hence it is not finding the correct webdriver.

So what do I have to do so that it add the chromedriver path properly in Environment variables?

from webdrivermanager.net.

rosolko avatar rosolko commented on August 21, 2024

Check if your current path variable.
Is it contains chromedriver 78 version path?
Is it contains chromedriver 80 version path?

I mean, not from a script, just generally, on your local machine.

from webdrivermanager.net.

roysouma avatar roysouma commented on August 21, 2024

It was some system issue. Uninstalled VS and deleted package. Reinstalled VS and checked out package and now everything went back to normal.

from webdrivermanager.net.

Related Issues (20)

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.