SeleniumGrid encountered an issue with creating a new session, resulting in an org.openqa.selenium.SessionNotCreatedException. The error was caused by the inability to generate a new ChromeDriverService. This occurred with build information version

My journey began with the following commands:

Hub Command: java -jar selenium-server-standalone-3.141.59.jar -role hub

Node Command: java -Dwebdriver.chrome.driver="\Users\rachitamittal\eclipse-workspace\firstjavaproject\drivers\chromedriver.exe" -jar selenium-server-standalone-3.141.59.jar -role node -port 5556 -hub "http://localhost:4444/wd/hub" -browser browserName=chrome,maxInstances=3

I initially set up a single node.

Here's my program:

@Test

public void remotetester() throws MalformedURLException

{

DesiredCapabilities cap = DesiredCapabilities.chrome();

cap.setBrowserName("chrome");

cap.setPlatform(Platform.MAC);

RemoteWebDriver driver=new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),cap);

driver.get("https://www.google.com/");

driver.manage().window().maximize();

driver.close();

}

Error:

org.openqa.selenium.SessionNotCreatedException: Unable to create new service: ChromeDriverService

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'

System info: host: '///////////', ip: '/////////////////', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.4', java.version: '14.0.1'

Answer №1

I hope you're doing well and staying safe! It seems like the issue lies in the incorrect path of the webdriver. It appears that you may have forgotten to include the method drive (i.e. C:) in your web driver path.

If you're new to configuring Selenium Grid on your local system, there's a helpful utility you can use for automatic configuration. Check out this link: https://github.com/frostyaxe/Talongrid

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

Issue with Selenium failing to clear search bar using .clear() method

When scraping a website, I noticed that the search bar auto-populates with the last search query. Even after using .clear(), the search bar still retains the previously searched item. for sku in skus_to_find: search_bar = WebDriverWait(driver,100).unti ...

Configuring flash to work with Selenium using Python's Firefox browser

Every time I open Firefox, the Flash plugin is there. However, when I use Selenium to open Firefox, Flash is not enabled. How can I enable Flash in Selenium? Here is the code snippet I am currently using: firefoxProfile = FirefoxProfile() firefoxProfi ...

Parsing HTML documents for links with Selenium and JUnit

Issue with NullPointerException at if (hrefAttr.contains("?")) An error has surfaced in my project. I'm utilizing selenium and JUnit to navigate through links and cross-reference them with a list of URLs from a CSV file. Everything was working smoot ...

A comprehensive guide on starting Tor Browser with Selenium and Python

Currently, I am attempting to access a webpage in Tor Browser using Python. Here is the code snippet: # Begin: Code For TOR Browser from selenium import webdriver from selenium.webdriver.firefox.firefox_profile import FirefoxProfile from selenium.webdriv ...

What is the best way to start multiple URIs in Selenium without causing Firefox to crash?

I have a file containing around 2000 URIs that all belong to the same URL. I am looking to create a Python program that will iterate through these URIs one by one and use selenium to check for the presence of images on each page in Firefox. Is there ...

When passing the output of one function as an argument to another function, an error is occurring known as the 'StaleElementReferenceException'

My Python program consists of two functions - one extracts text from an image using pytesseract, and the other function uses this extracted text to make a Google search with selenium. When I call both functions separately in the same program, they work no ...

Managing Unexpected Pop-Up Windows with Selenium

Our platform has a unique feature where customer feedback is collected. To ensure user engagement, a random window pops up when the user logs out, although not every time for each customer. I am looking to address this scenario in my automation code. Cur ...

Dealing with numerous statements in the Run Keyword If command in Robot Framework

I am looking to run multiple statements only if a certain condition is met in Robot Framework. Here is the code snippet to review: Please note that this is just a sample code *** Settings *** Library Selenium2Library Library Collections *** Keywor ...

Retrieving information from an Open Office spreadsheet using Selenium and Java

Can Open Office spreadsheet (ODS) files be utilized for reading and writing data in Selenium with Java? I have conducted a thorough search online but have not been able to find any solutions. Any assistance would be greatly appreciated. ...

What could be causing an undefined error when running Javascript with Python and Selenium?

My goal is to utilize Javascript for retrieving a table body element on a webpage. Upon executing the script immediately, I receive an undefined response. However, if I introduce a few seconds delay, it functions correctly. def fetch_row_list(browser): ...

The Selenium grid console fails to launch when attempting to start the Selenium Hub programmatically

While using Mac OS Sierra (10.12.5), I encountered an issue when starting the selenium server with a hub role from the command line: java -jar selenium-server-standalone-3.4.0.jar -role hub Upon opening the grid console at http://localhost:4444/grid/con ...

Using Selenium Webdriver with Python for navigating through classified ads on leboncoin, encountering difficulty in selecting a dropdown list and input box

Continuing my journey on the Python/Selenium learning curve. Selenium Webdriver - Python - leboncoin - Issue with selecting a button containing an accent After successfully logging in to the site and selecting the button, I aim to populate the fields for ...

Using Selenium to modify the sorting of Google Maps reviews

I am encountering a fascinating issue with my **Web Scraping** project. My goal is to retrieve the latest **Google Maps reviews**. I specifically need to arrange the reviews based on their date of posting. Although most tutorials I've come across a ...

Selenium technique for navigating iframes without specific identifiers

I encountered an issue while trying to switch to an iframe on a page I am scraping. The ID has been removed from the iframe, making it difficult for me to switch to it. Unfortunately, I have not been able to find any helpful documentation on this matter. I ...

Tips for dealing with a new tab in Internet Explorer using Selenium?

Whenever I open a new tab in IE, I find it difficult to navigate. Is there a way to easily handle the new IE tab and go to a specific URL? One method is by using Ctrl+T. ...

Selenium webdriver offers the capability to retrieve null values through the Webelement

How can we use Selenium WebDriver with a keyword-driven framework to recognize and open verification emails in Gmail when the registration is done from a different domain? I have created two methods - one containing all the keywords with operations, and a ...

There are no attributes currently present in the Document Object Model for the Tooltip

Can anyone assist me with an issue I'm having regarding tooltips? Some tooltips are missing certain attributes like title, and I need help identifying the tooltip shown in the image below. Just to note, there is no attribute related to the tooltip pr ...

Is it possible to retrieve ZIP codes from a website using Selenium with Python?

Just starting out with Python Selenium and looking to extract some specific information. I need to pull the postal code 10080 from this link: tools.keycdn.com/geo ...

Error encountered in Selenium while attempting to test the login functionality with Java: NoSuchElementException

Currently, I am following a Selenium testing framework tutorial by John Sonmez and encountered an issue while attempting to execute my very first test. The test involves two methods: 1. LoginPage.GoTo(); which opens the Wordpress login page and 2. LoginPag ...

Issue with updating Selenium ChromeDriverManager through a proxy network

I am trying to use selenium and Chrome with Python to access a website. Below is a snippet of my code: from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.service import Service # PROXY=&a ...