Separating MS Edge Driver into its own configuration file in wdio

Seeking assistance with creating separate configuration files for Chrome, Firefox, and Microsoft Edge drivers on webdriver.io (version 7.19.3). Struggling to configure the Microsoft Edge driver on a Windows 10 machine while maintaining the main wdio.conf.js file with only general settings.

Attempted configurations:

exports.config = merge(wdioConf.config, {
capabilities: [
{
  maxInstances: 1,
  browserName: 'MicrosoftEdge',
  osPlatform: 'Windows',
  osVersion: '10',
  acceptInsecureCerts: true,
},
],
baseUrl: 'https://some.site.for.testing,
waitforTimeout: 10000,
connectionRetryCount: 3,
services: ['selenium-standalone'],
seleniumArgs: {
  javaArgs: [
      '-Dwebdriver.edge.driver=path.join(__dirname, "./node_modules/selenium-standalone/.selenium/edgedriver/17134/MicrosoftEdgeDriver.exe")'
   ]
 }
});

Another attempted configuration:

exports.config = merge(wdioConf.config, {
capabilities: [
 {
  maxInstances: 1,
  browserName: 'msedge',
  acceptInsecureCerts: true,
 },
],
 baseUrl: 'https://some.site.for.testing',
 waitforTimeout: 10000,
 connectionRetryCount: 3,
 services: [['selenium-standalone', { drivers: { msedge: 'latest' } }]],
});

Both attempts were unsuccessful, resulting in "missing configuration" or the runner getting stuck when running the command

npx wdio run config/wdio.edge.conf.js
.

Tests run smoothly with FF and Chrome:

npx wdio run config/wdio.chrome.conf.js

Any help would be greatly appreciated. Thank you!

Answer №1

If this solution can be helpful to anyone, the only way it was achieved is by:

Make a duplicate of the wdio.main.conf file and in the browser capabilities section, include the setup for Microsoft Edge (following the solution provided at: https://dev.to/tswiftma/webdriverio-edge-driver-options-5038).

Lastly, rename the main.conf file to something like wdio.msedge.conf.

NOTE: Simply adding the Edge configuration into main.conf (without making a copy) will result in tests running only in Edge. They will not run in Firefox or Chrome.

The original configuration file wdio.main.conf remains unchanged.

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

Ways to retrieve information from a request handler

Working with express, node, and handlebars, I've implemented this piece of code to manage POST requests. When a user hits the "add item" button, it captures their input for a city, fetches the weather data for that city using the Open Weather Map API, ...

A guide to setting an href using variable values in jQuery through manual methods

I have a datepicker set up where each day, month, and year is stored in a variable. I then display this information in the desired format. Below is the jQuery code: jQuery(document).ready( function($){ alert('alert function'); var txtFr ...

Exploring child elements of a By locator using Selenium in Java

I am working with an enum list of By locators for WebElements on a page. My goal is to select a specific option from a select box using a combination of the enum and additional information about the value I want to select. Is there a way to achieve this? U ...

There seems to be an issue with the import class for React PropTypes. The prop

I have multiple oversized items that are utilized in numerous components, so I created a PropTypes file for each item. For example: PropTypes/PropLargeObject.js This file contains: import PropTypes from "prop-types"; const PropLargeObject = Prop ...

Initialization of the page factory

I have successfully implemented a framework using the POM and Page Factory approach. In my baseTest class, I have multiple initializations such as: Registration regPage = PageFactory.initelements(driver, Registration.class); Login loginPage = PageFactory. ...

Streamlined logging features with protractor

Seeking ways to simplify logging for developers creating selenium tests using protractor. Currently exploring the possibilities with selenium-webdriver/lib/logging to establish an efficient logging system. Below is a sample spec: it('should NOT dis ...

In my attempt to simulate redis using jest and javascript, I've noticed that whenever I try to access redis.mock.instance[0], it consistently returns as empty

I'm currently attempting to simulate redis with jest and JavaScript, but I'm encountering an issue where accessing redis.mock.instance[0] always returns empty. RedisWrapper.js: const Redis = require('ioredis'); const REDIS_USER_TTL = 6 ...

AJAX: Learn how to execute an AJAX call using a JavaScript function

Is there a method to determine (using developer tools like Chrome, Firefox, Opera, etc) the most recent function that triggers an AJAX call? This could be helpful for debugging web applications. Appreciate your help ...

Utilizing D3.js v4 to showcase a JSON file on a map

I am attempting to create a map similar to the one created by Mike Bostock. You can access my JSON file (here), which represents Europe divided into NUTS 2 regions. The structure of the JSON file is as follows: { "type": "Topology", "objects": ...

Ways to determine if a dynamically generated script tag has been successfully executed

Recently, I've been experimenting with dynamically creating a script tag: var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.charse ...

What is the best way to extract values from promises that are still pending?

Having some issues with the code below and unable to achieve the desired output. Any help in identifying what's wrong would be greatly appreciated. Thanks! Here is the code: // Making http requests const getJSON = require('get-json'); ...

How can you center the body of a webpage while using the zoom in and zoom out features in HTML5?

What is the best way to maintain body alignment while zooming in and out on a web page? <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> body { font-family: 'Merriweather Sans&apos ...

Highlighted Answer: Choosing between two options in the quiz

I am currently developing an employability quiz for my university project. Each question offers a choice between Yes and No answers. If the user selects the Yes answer, it will be highlighted in green and display the correct answer below. However, if the ...

Trouble obtaining output from chrome.tabs in browser console

Currently, I am experimenting with the browser's console and attempting to retrieve all the details of the active tabs. In order to do so, I open the browser's console and input the following: However, I encountered the following error: VM713:1 ...

Guidelines for creating a reference between schemas in Mongoose and inserting data using JSON

I am currently developing a node.js application where I am working with two mongoose schemas called Wallet and User. I am aiming to establish a relationship where Wallet is referenced in User and pass the appropriate JSON data using POSTMAN. This concep ...

How does JavaScript function syntax differ in Next.js and JSX?

I'm in the process of creating a function that allows users to select different sizes. It currently works fine with just JavaScript and HTML, but I'm encountering an error when using it in Next.js. Can someone confirm if my syntax for the JavaScr ...

Dividing internal CRUD/admin panel from the live application

Currently developing a moderately complex react app with redux. We have a production version that meets our requirements and now we are working on an administrative area for a local version of the application. This local version will only have basic CRUD f ...

Preserving and Reversing Drag and Drop Canvas Configurations in HTML5 Canvas

With the help of this innovative JS Fiddle, I have successfully created dynamic canvases and enabled the functionality to drag and drop images across multiple canvases. var next = 4 function addCanvas() { // create a new canvas element ...

Having trouble with Angular JS functionality

Today is my first day diving into AngularJS and I'm eager to learn more! Despite grasping the concept of how model-controller-views operate in AngularJS, I encountered an issue where the variables are not displaying as expected. Instead of the values, ...

Passing the import name as a prop in React and combining it with the image src

I am struggling with a React component that has a prop being passed as an Import, which contains the path to an image. For this instance, the prop value is Ico1. The challenge lies in passing the prop in the img src attribute, like so: See the code belo ...