Steps to initiate my selenium-standalone server: Execute the command "selenium-standalone start"

I'm currently facing a challenge while trying to execute a test script in WebDriverIO.

After cloning the code from wdio-cucumber-framework, I am unable to get selenium-standalone to start properly.

The error message indicates an issue with geckodriver, but I can't seem to find a solution anywhere.

/Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/bin/selenium-standalone:79 throw err; ^

Error: Missing /Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/.selenium/geckodriver/0.23.0-x64-geckodriver at /Users/adam/.nvm/versions/node/v10.15.1/lib/node_modules/selenium-standalone/lib/check-paths-existence.js:15:20 at suppressedCallback (fs.js:200:5) at FSReqWrap.oncomplete (fs.js:141:20) sira-JSS774:wdio-cucumber-framework sira$

I've experimented with different versions and have confirmed that geckodriver is installed. However, it seems like the required directory ".selenium/geckodriver/0.23.0-x64-geckodriver" does not exist.

I was anticipating for "selenium-standalone start" to function correctly in the terminal, but unfortunately, it's not working as expected.

Answer №1

To use selenium-standalone, you must first install the drivers by running selenium-standalone install

Once this command is executed, the drivers will be downloaded and installed in the directory

/path/to/node_modules/selenium-standalone/.selenium/****

Subsequently, starting the driver servers can be done with the command selenium-standalone start

A helpful tip: I have incorporated this as a devDependency within my project. This allows me to utilize the CLI using npx as a prefix (similar to sudo)

Below is a simple guideline for configuring selenium-standalone:

  1. Add as a devDep: npm i -D selenium-standalone
  2. Install web drivers: npx selenium-standalone install
  3. Launch web drivers as a detached process:
    npx selenium-standalone start &
  4. Execute tests: npm test

Answer №2

Dealing with the same challenges today. According to their documentation, the solution involves installing all driver binaries, even if they won't be used, in order to get the server up and running.

yarn selenium-standalone install --singleDriverInstall=chrome --drivers.chrome.version=95.0.4638.69
...
yarn selenium-standalone install --singleDriverInstall=geckodriver
yarn selenium-standalone install --singleDriverInstall=msedgedriver

After that, executing

yarn selenium-standalone start --drivers.chrome.version=95.0.4638.69
resolves the issue.

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

A guide on implementing the href attribute in Material-ui

I previously asked about this code, but my wording was unclear. I am trying to get the menu items to work with href links. Currently, only the "Home" button works with href, while the "Sessions Home", "Book a Session", and "[S] Host a session" buttons do n ...

The Cookie Accept button remains elusive to Selenium's searching eyes

Is anyone else experiencing difficulty with locating the Cookie Accept button in Selenium? I've tried various methods and wait strategies, but nothing seems to be effective. When the Cookie banner pops up, the main window in the background becomes gre ...

How can JavaScript be used to remove HTML tags from text while preserving a space between each line?

I found a helpful solution on Stack Overflow for removing HTML from text content. This is the method it suggests: function strip(html){ let doc = new DOMParser().parseFromString(html, 'text/html'); return doc.body.textContent || "&quo ...

A Greasemonkey script for organizing and categorizing webpage elements

I've been working on a script to enhance the functionality of Facebook's find friends page by organizing suggested friends based on mutual connections. If you're interested in checking out the code, you can find it right here: http://pasteb ...

Issue with ExtJS causing store to not load properly

I have been working on this issue for over a week now and cannot seem to get it resolved. The webservice is returning data, which I can see, but the store is not loading it correctly. The only time I managed to display the entire response in the grid was w ...

The functionality of JSON.stringify does not take into account object properties

Check out the example on jsfiddle at http://jsfiddle.net/frigon/H6ssq/ I have encountered an issue where JSON.stringify is ignoring certain fields. Is there a way to make JSON.stringify include them in the parsing? In the provided jsfiddle code... <s ...

What is the best way to merge these approaches in Python that have comparable functionalities?

These 2 methods are quite similar, but one posts in English groups and the other in Dutch. How can I streamline this code without sacrificing functionality? Here is the code: message = "Hi" messageNL = "Hoi" def post(status, filename_tmp, filename_txt): ...

Guide on Incorporating Coffeescript into the Node.js Blueprint Framework

Have you checked out Skeleton (https://github.com/dstroot/skeleton) yet? It appears to be a robust framework for node.js, offering all the middleware you need. However, it seems to lack support for coffee script. How can we incorporate it into our project? ...

Organizing an HTML layout

Looking for a way to sort a div structure based on a parameter, I came across a small JavaScript that seems to not work as expected. It appears that the sorting function is not parsing the values perfectly... This is the logic I am using for sorting: < ...

Executing the beforeRouteLeave navigation guard on a vue component for testing purposes

I am facing a challenge with unit testing the routing behavior of a vue component using jest. Specifically, when navigating away from the component, the 'beforeRouteLeave' guard in Vue-router is not triggering during testing, even though it works ...

Error code 400 encountered when processing Stripe webhooks

I've been working on integrating stripe webhooks into my node.js/express application, but I keep running into a 400 response from the stripe cli. Even though I followed the documentation closely and ensured that the secret key for the webhook is corre ...

Employing eval for parsing the JSON data

function ajaxFunction(){ var ajaxRequest; // The variable that enables the use of Ajax technology! try{ // Compatible with Opera 8.0+, Firefox, and Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // For Internet Explorer Browsers ...

Sometimes, the `undefined` TypeError can unexpectedly pop up while making Ajax calls

Here is my issue with AJAX request and response: I have around 85 HTML pages that all use the same AJAX request. However, when working with these files, I sometimes encounter the following error. AJAX $(document).ready(function(){ localStorage.setIte ...

Guide to sending a similar request as a curl command through a JavaScript file

After reviewing this Stack Overflow post titled "JavaScript post request like a form submit", I came across a similar situation. Currently, I have a curl command that performs as expected: curl -v -X POST -H "application/json" -H "Content-type: applicatio ...

"Discover the step-by-step process of transforming an input field value into a checkbox with

I've been experimenting with creating a To-Do list using HTML, CSS, and Javascript. I've managed to capture the input field value in a fieldset so far. However, my goal is to find a way to transform the input field value from the textfield into a ...

Enable hyperlink to open in a new browser tab after user clicks on button embedded inside an iFrame

<head> </head> <div> <iframe src="https://....."></iframe> </div> I'm looking for a way to open the link in a new tab when clicking on this button. Currently, the page loads within the iFrame when clicked. I&a ...

"Exploring the possibilities of RSelenium and Javascript together

While I have a strong understanding of R, my knowledge in javaScript and other languages is very limited. My goal is to access information from a publicly-available data set found here: . Specifically, I have a list of postal codes formatted as 'A1A1A ...

What are some creative ways to design the selected tab?

In my Vue parent component, I have multiple child components. There are several elements that toggle between components by updating the current data. The issue is that I am unsure how to indicate which tab is currently active. I've tried various li ...

Encountering Routing Issues in Express.js Following Passport.js Authentication

My authentication setup with Passport.js is pretty straightforward. After the user successfully authenticates, I redirect them to /work like this. app.post('/login', passport.authenticate('local', { successRedirect: '/ ...

saving user information with asynchronous HTTP calls

I am encountering an issue while trying to save my form data using AJAX. When I submit the form data in a JavaScript file that calls another PHP file to perform an insertion operation, an error occurs. Here is the code snippet: <button id="submit" cl ...