Resolving IllelegalStateException, SessionNotCreatedException in Selenium

preview_player
Показать описание
In this video I will talk about both traditional/recommended methods to configure browser driver /web browser driver in Selenium WebDriver.
How to configure WebDriverManager, so that it can take care of automatically updating driver version along with updation of browsers. Use of WebDriverManager so that, we will never face IllegalStateException .Or SessionNotCreatedException: this version of Chrome Driver only supports Chrome Version ((87)).
I will also talk about reasons behind IllelegalStateException, SessionNotCreatedException and multiple ways to resolve them.
In the process, we will also see, how to create a basic Maven Project . The process to verify chrome version is also included in this video.

timesnaps:
9:50 :How to configure WebDriverManager

Browser Driver:
Browser driver is a separate executable/binary file. that is used by Selenium WebDriver to control Chrome. It is impossible to run Selenium test scripts on the browsers (e.x:Chrome) without respective browser driver (e.x: ChromeDriver)

This browser driver executable file is provides by third party. i.e: not developed by Selenium, rather it is developed by browser company.

Hence it needs to be configured in Selenium projects, so that Seleneium webdriver can utilise them , thus simulate user interaction on browsers.

There are multiple feasible ways to configure these browser drivers as below:
1. Updating System Properties (Outside Code)
3. WebDriverManager

The first two options are traditional way of configuring browser binaries and have below shortcomings:
a. We need to manually download driver binaries and set path for the same.
b. As and when browser version is updated, again driver executable/s that can be matched with latest browser version needs to be downloaded.
c. We need to set exact path for driver executable/s else we get illegalStateException. [When we try to launch browser without setting correct path for driver executable/s]
d. We will get SessionNotCreated exception, in case of mismatch between browser driver version and browser version.

To avoid above manual activities , exceptions and hassles, WebDriverManager is the most recommended one, as it takes care of updating driver version automatically, along with updation of browser.

Links:

Please go through other videos:
===============================================
===============================================

===============================================
Рекомендации по теме
Комментарии
Автор

i am getting error of "Error occurred during initialization of boot layer
".pls resolve asap.

theamitbhardwaj