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

What is the best way to extract an object from an array that only includes one element, and that element is an object?

Here is the output of my updated function: db.collection('SOCIAL').get().then((snapshot) =>{ snapshot.docs.forEach(doc => { tempData.push(doc.data()) }) return tempData }) I want to store these valu ...

What does dist entail?

I am currently utilizing gulp to create a distribution folder (dist) for my Angular application. After consolidating all the controllers/services JS files and CSS, I am now faced with handling the contents of the bower folder. In an attempt to concatenat ...

Can a JavaScript function be sent back via AJAX from PHP?

Can a javascript function be returned via Ajax from php? Typically, I would just return a value and handle it in plain javascript. However, since I am working on an Apache Cordova mobile app, I need to approach things differently. account = localStorage.g ...

JQuery and PHP: Saving a rearranged set of divs in a form

Although I've searched for similar questions, none seem to address my specific issue. My problem involves a form with divs generated from a JSON array saved in a separate file. To style the form, I'm using Bootstrap and implementing JQueryUI&apo ...

What is the solution for making the Chrome web driver import accessible in Selenium Java?

UPDATE: CHANGING THE JAVA COMPILER VERSION TO 1.7 SOLVED THE ISSUE, THANK YOU ALL! I am relatively new to Selenium and I have imported all the necessary libraries into my project (downloaded from the official Selenium page) and started writing some code ( ...

Error: Reference 'ref' is undefined in the 'no-undef' context. I am interested in experimenting with loading images from Firebase storage

While working with React, I encountered an issue when trying to fetch an image URL from Firebase Storage and display the image. The error 'ref' is not defined (no-undef) occurred. https://firebase.google.com/docs/storage/web/create-reference Th ...

In AngularJS, enhance pagination loading by appending a $resource queried array to the end of another

I'm currently working on implementing a loading feature for my Angular application. The goal is to preload page 3 when a user navigates to page 2. Utilizing $resource, I'm querying the Posts resource using Post.query(). By calling Post.query({pa ...

What is the reason the 'Add' type does not meet the 'number' constraint?

I experimented with type gymnastics using Typescript, focusing on implementing mathematical operations with numeric literals. First, I created the BuildArray type: type BuildArray< Length extends number, Ele = unknown, Arr extends unknown ...

Getting the input from an HTML editor and inserting it into a textarea using JavaScript

Currently, I am in the process of developing an HTML editor for a project. I have downloaded a program online that I am attempting to customize according to my requirements. However, I am encountering difficulties when trying to retrieve the inner HTML of ...

Unable to upload file on ReactJS platform

I'm facing an issue while trying to upload a file and text using a form. The file doesn't get uploaded, although it works fine with Postman. Can anyone identify the problem? Thank you Axios function : postArticles : (content, attachment, header ...

Is it possible to execute Ajax insertions in the right sequence without relying on async:false?

My ASP.Net MVC page contains an AJAX form that allows users to submit data manually or copy large amounts of data for submission at once using JavaScript. @using (Ajax.BeginForm("action", "controller", new AjaxOptions { HttpMethod = "POST", ...

AngularJS File Input element triggering only once when selecting the same file

I have created an Angular directive to customize the file upload input. directive('ngFile', function () { return { link: function (scope, element, attrs) { var button = element.find('button[data-fileInputButton]&apos ...

Applying VueJS filters to refine object values

Is there a way to verify if the value of "startAt" is present in an object and return its corresponding ID? Here is the object in question: [{ "id": "1234567", "createTimestamp": "2020", "name": { "action": "", "allDay": false, "categor ...

Issue encountered: Unable to locate module: Error - Unable to resolve '@cycle/run' with webpack version 2.2.1

I am attempting to run a hello world application using cycle.js with webpack 2.2.1. The following error is being displayed: ERROR in ./app/index.js Module not found: Error: Can't resolve '@cycle/run' in '/Users/Ben/proj/sb_vol_cal ...

Is there a way to dynamically change the title of a tab when new content is added to a minimized page?

Is anyone familiar with how websites like Facebook and Buzzfeed update their tab titles when there are multiple tabs open? I have noticed that sometimes they add a "(1)" or "(2)" to indicate changes on the page. Do they use JavaScript to achieve this eff ...

Tips for managing SSL Certificate Error in Selenium 3

I've been working with the code provided below, but I'm experiencing issues in Chrome Version 79: DesiredCapabilities capability = DesiredCapabilities.chrome(); capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); //capability.setCap ...

Edgeshelper failing to update mesh positions

I want to create a custom colored box with different colored edges. To accomplish this, I'm using the following code to generate the box and its edges. I've encapsulated both elements within an object3D since there will be multiple objects in the ...

Python: How to enhance Selenium, WebDriver, and BeautifulSoup performance?

Currently, I am facing a challenge in scraping a Google shopping page reliably. The page is heavily loaded with JavaScript which BeautifulSoup doesn't seem to parse effectively. To address this issue, I have resorted to using Selenium and WebDriver to ...

Retrieve values from an array of objects using their corresponding keys

I have an array populated with various objects containing different key-value pairs. I need to extract specific values from the array and determine if a certain value is present or not. function groupByName (contract) { const { age } = contract; const g ...

Why is Socket.io functioning on localhost but fails to work once deployed to Heroku?

Sharing my socket server code: const io = require("socket.io")(8080, { cors: { // origin: "http://localhost:3000", origin: "https://mern-bubble.herokuapp.com", }, }); This is the client-side implementation: useEf ...