New Update Required for Selenium Chrome Driver Version in ASP.NET Core Selenium Testing

Currently, I am encountering challenges with my Selenium tests failing both locally and on the DevOps Azure pipeline for Selenium testing.

The root of the error seems to be a version discrepancy between the browser and driver being utilized.

Despite attempting to install an updated Chrome driver, the error persists. Even on the pipeline, it indicates that both drivers are incorrect versions for the browser in use. Previously, the Selenium Tests ran smoothly without any issues.

Displayed below is the content of my csproj file for the test project:

<ItemGroup>
    <PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
    <PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
    <PackageReference Include="Selenium.WebDriver" Version="4.4.0" />
    <PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Vsxmd" Version="1.4.5">
        <PrivateAssets>all</PrivateAssets>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
</ItemGroup>
<ItemGroup>
    <None Update="appsettings.test.json" CopyToOutputDirectory="Always"></None>
    <None Update="Drivers\chromedriver.exe">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="Drivers\msedgedriver.exe">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
</ItemGroup>

In the folder below, I have stored the drivers:

https://i.sstatic.net/snspu.png

The issue identified states that the browser being used does not match the driver version.

https://i.sstatic.net/jwqxo.png

The driver folder that gets outputted to Tests.Selenium\bin\Debug\net6.0 contains the older version instead of the newly updated version. https://i.sstatic.net/wHMf9.png

How can I determine the correct version needed to align with the browser running on the pipeline and locally?

Answer №1

Resolved: Upon investigating the Drivers folder in the bin directory, I discovered that the updated drivers were not showing up as expected. Instead, the older versions of the drivers were still present. To address this issue, I accessed task manager to close all instances of the drivers and then proceeded to delete both the bin and obj folders. After re-uploading the driver folder, the updated drivers appeared successfully.

It seems that there is an issue with the output of the updated driver folder into the bin directory.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

JavaScript Arrays and Their Mysterious Undefined Elements

Creating a basic HTML document with a JavaScript script can be quite simple. ... <script type = "text/javascript"> src = "xxx.js"></script> ... <body> <ul id ="pics"> <li><a href="A.jpg">A</a></li> ...

Uploading and previewing images using AJAX in an ASP.NET application

I recently designed a webform that includes a feature for file uploads. Specifically, I am looking to upload an image and display a thumbnail of the selected image once uploaded. Additionally, after submitting the page, I intend to save the image path to a ...

Guide on implementing ES6 script's template literals

I've been tackling a template literal question on hackerrank. It's working smoothly on my local IDE, but encountering an error on the Hackerrank IDE. Here's the code to add two numbers and print the result using a template literal: const sum ...

Ensure that function calls within a for loop are executed synchronously

In the request, I am receiving an array of strings where each string represents a command that needs to be executed on the native shell. var process = require('child_process'); function executeCommand(req,res,callback){ var params = req.param ...

What methods can you use to locate the CSS selector within HTML that meets certain criteria?

Is it possible to parse a given link and find CSS selectors with attributes that partially or completely match a specific keyword? For example, if the keyword is "print," I want to identify all CSS selectors in the link containing "print" in their name, id ...

Double rendering issue with dynamic Vue components

In my dashboard, I am incorporating dynamic components. The issue is that the only dynamic component I have right now is being rendered twice when it should not be. I have attempted conditional rendering, but to no avail. Although I can share some code h ...

Having trouble with installing Node Windows NPM?

I'm attempting to install a simple package in Node.js, but when I use the standard command, it indicates that it cannot find the file or directory (refer to the image below). Despite updating and re-installing npm, the issue persists. I am using Windo ...

Ways to identify when a chemical reaction has taken place?

I have developed a Discord bot that interacts with an API related to a game server panel. The bot has tasks to start, restart, stop, and kill the server. I want to enable end users to trigger these tasks by reacting to a specific embed posted by the bot. ...

The proportion in Highchart appears incorrect when utilizing a "logarithmic" y-axis type

I have encountered an issue with Highcharts in my AngularJS application. Specifically, I am using Highcharts JS v7.2.1 (2019-10-31). When I set the y-axis type to "logarithmic," it causes the bars to render incorrectly in terms of proportion. If I don&apos ...

Is it possible to alter a JavaScript variable using PHP?

I am working with a global JavaScript variable called btnEnabled, which is initially set to true. This variable controls the state of the submit button in my form. During an AJAX call when populating a div with innerHTML, I need this variable to switch to ...

Challenges in developing a Dockerfile for a .NET Core application

I'm seeking assistance with creating a Dockerfile for a .NET Core application as I am new to Docker. The application is structured in the following way: FarmHouse.Services.AuthenticationService │ ├───FarmHouse.Services.Authenticatio ...

Retrieving the smallest and largest values of a Django model attribute within a template

My data model looks like this: class Integer(models.Model): integer_value = models.IntegerField(default=0) current_price = models.DecimalField(max_digits=5, decimal_places=2, default=0.00) share = models.IntegerField(default=0) market = mo ...

Detecting Tab Clicks in JQuery: How to Determine When a Tab has been Selected

Currently implementing the JQuery Tabs. In order to trigger one of my functions upon clicking on a specific tab, what is the method to bind an event to each JQuery Tab individually once clicked? ...

Unveiling the hidden: Leveraging Selenium and Tor to interact with a "hidden" button using the HTML ID

When using Selenium with WebDriverWait in Firefox, I am encountering an issue where I am unable to press the "Accept" button. The button appears normally on a regular browser, but when accessed through Tor, it is obscured by a shadow and never displays pro ...

Using jQuery validation to verify that a minimum of one radio button holds a true value

I have a form with two questions. The first question asks if the product value exceeds a certain fixed amount, and the second question asks if the product value is below that fixed amount. Upon submitting the form, validation should ensure that at least on ...

Angular view fails to update after form submission when using ngDialog to change the scope

After starting my Angular journey, I decided to challenge myself by creating a comprehensive todo app for educational purposes. I seem to be missing something pretty basic, although I can't quite put my finger on it. It seems like there might be an is ...

Issue with retrieving an array of objects in an Angular function

Good day, I am facing an issue when attempting to retrieve an array of objects from an external function. I have defined a class called Object with 2 properties, a constructor, and a method that returns an array containing more than 50 objects. For this e ...

Exploring the features of NodeJS, diving into the world of mapping,

Currently, I am working in a Node.js environment and dealing with an array of IDs. My goal is to filter these IDs based on the response of another API call. Essentially, I need to check if each ID meets certain criteria specified by this external API. Whi ...

Vue 2.0 custom filter not producing any output

I am attempting to create a customized filter that identifies and returns the items that correspond to a given input. It functions effectively with basic arrays like ['Apple', 'Banana', 'Cupple'], but encounters difficulty whe ...

Ways to display a block within the visible window by simply clicking on another block

I'm in need of assistance with this issue. Please take a look at the fiddle link below to understand the specific requirement. $(document).ready(function(){ $('a.n-stand-b, a.n-stand-a, a.e-stand-b, a.e-stand-a, a.w-stand-b, a.w-stand-a, a.s-s ...