Showing posts with label selenium. Show all posts
Showing posts with label selenium. Show all posts

Thursday, May 28, 2020

Chromedriver version error


The one error that I have ran into a few times by now is the version mismatch error between the Chrome application and the chromedriver on my machine (Mac OS)

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 83

For most of my project I had an alias for chromedriver getting added in the lib folder (It would show up after successful execution of a test case but I need to figure out why it was showing up there). I would simply download the latest chromedriver version and drop it in the the original location of the driver-alias in the project. 

However just started a new project after not working on automation for past one year. In this new project the chromedriver alias is not getting added to project (again need to find out why not, what is diff between the two projects). While working through other issues today I landed back at this error (obviously I was demoing at the time, meh) and without the alias had to go googling about the error. 

So to fix the issue there are two possible solution
1. Update the chromedriver executable to the correct version manually OR
2. Use chromedriver-manager package to handle all the version management

Solution 1:

  1. Download the correct driver version from https://chromedriver.chromium.org/downloads
  2. Unzip the file
  3. Manually copy the executable to /usr/local/bin (overwrite the previous version in folder)
Solution 2:
I have not tested this solution yet but the idea makes sense. Will Need to understand how it works. https://stackoverflow.com/questions/60296873/sessionnotcreatedexception-message-session-not-created-this-version-of-chrome


As always solution 1 has resolved the error, so I'll move on with the other issues on project. 


To Do:
  1. Why is chromedriver alias created in project 1
  2. Why is chromedriver alias NOT created in project 2
  3. Find out how solution 2 works and to set it up



Friday, July 1, 2011

Getting Started with Automation

With a bit of lax time in between two releases, I am trying to automate our regression test-cases we run after each build. To keep the cost in check I am trying to get this working using Selenium, C# and NUnit. However as I try to Google the basic tutorials for doing so I always find something that assumes the reader understands how Visual Studio, .NET versions and C# work. (I have no clue about the environment setup, though if all is set I am quite positive I can churn out a windows as well as a web application in C#)

So for my own sake and for those poor souls who find themselves in similar situation as mine I am planning to develop a step by step series for automation using Selenium, Visual Studio C# 2010 Express, and NUnit. I will be putting up a series of posts as I learn to do the things myself. Each post will contain a simple goal that I will solve/reach most probably with someone’s help (which will be listed in the credits)

Goal: Setup all the required software for test automation
Steps:
  1. Selenium 2  (Selenium IDE 1.0.10)
    i)        You can follow the detailed download and install steps for Selenium IDE on the official Selenium site here(Just ignore the first download page image)
    ii)       For Selenium 2.0 we need to download the Selenium Client Driver for the language of our choice i.e. C# (The download site has two drivers for C# - C# Selenium RC 1.0.3 and C# Selenium WebDriver 2.0rc3, as I am not sure what is the difference between them I have downloaded both – Might revisit this post in future when I understand the difference)
    iii)     Once installation is complete you should be able to start the IDE from the Firefox > Tools menu (NOTE: IDE 1.0.10 is compatible with Firefox 3.6 only, so if you have already upgraded your Firefox to version 4 or 5 you will need to uninstall them and install version 3 again)
  2. Visual C# 2010 Express
    i)        Download the Visual C# 2010 Express from Microsoft’s site here and run through the simple installation setup
  3. Nunit 2.5.10
    i)        Download .msi file for NUnit from the official website here and run the setup process

Hopefully you won’t face any glitches during the installations and have all the three components up and running in no time.