Questions tagged [webdriver-io]

WebdriverIO, the widely renowned JavaScript library available on webdriver.io, offers unparalleled browser control through the powerful Selenium server using the WebDriver API.

What is the process for configuring simultaneous services on CircleCI for testing purposes?

My current project involves running tests with Jasmine and WebdriverIO, which I want to automate using CircleCI. As someone new to testing, I'm a bit unsure of the process. Here's what I've gathered so far: To run the tests, I use npm tes ...

elementToBeClickable is not supported by webdriverio

I am having some trouble with the 'waitForEnabled' function as it does not seem to behave like Webdriver's elementToBeClickable. Is there anyone who can provide some guidance on how to use this API effectively? ...

Is there a way to pinpoint the line number of a failed cucumber-js step while running through webdriver.io?

After upgrading from an ancient version of cucumber-js (4.2.1) to a more recent one (7.2.1), I am facing an issue where I can no longer determine the line in my feature file where a test is failing. My setup involves using cucumber with Webdriver.io (v7.7) ...

Uploading files using WebdriverIO v5 with Microsoft Edge

Currently, I am in the process of running an automation test on SauceLabs using WebdriverIO version 5. One of the tests involves uploading a file to Microsoft Edge. Below is a snippet of the code for reference: const path = require('path'); const filePath ...

Encountering a problem while creating a Page Object in webdriver.io - getting the error "setValue is not a function" or "cannot read property 'setValue' of undefined"

While working on a webdriver.io automation project, I encountered an issue with recognizing objects in my page object file (login.po.js) when calling them in the test spec file (test.spec.js). The error message displayed is LoginPage.username.setValue is n ...

Encountering issues with resolving dependencies in webdriverIO

I'm attempting to execute my WebdriverIo Specs using (npm run test-local) and encountering an error even though I have all the necessary dependencies listed in my package.json as shown below: [0-2] Error: Failed to create a session. Error forwarding the ...

Use Node.js with Selenium and WebdriverIO to simulate the ENTER keypress action on

I have put in a lot of effort trying to find the solution before resorting to asking this question, but unfortunately I have not been successful. All I need to know is how to send special characters (such as the enter key and backspace) with Node.js using ...

Is there a way to launch IE in 32-bit mode using webdriver.io?

I am currently executing a test with WebDriver.io using the npm package gulp-wdio on selenium-standalone. The code snippet I am using in gulp is as follows: gulp.task('e2e', function () { return gulp.src('wdio.conf.js') .pipe(wdio({ wdio: { ...

What is the method to select a hyperlink that includes a variable in the "href" attribute and click on it?

Currently, I am in the process of creating acceptance tests utilizing Selenium and WebdriverIO. However, I have encountered a problem where I am unable to successfully click on a specific link. client.click('a[href=#admin/'+ transactionId + &apo ...

Trouble with clicking in Selenium when using the MicrosoftEdge webdriver

I attempted the usual var elementForMs = driver.findElement(By.xpath(selector)); driver.executeScript("arguments[0].click()", elementForMs); as well as var elementForMs = driver.findElement(By.css(selector)); driver.executeScript("arguments[0].click()" ...

Encountering the error message 'array expected for services config' within my GitLab CI/CD pipeline

My goal is to set up a pipeline in GitLab for running WebdriverIO TypeScript and Cucumber framework tests. I am encountering an issue when trying to execute wdio.conf.ts in the pipeline, resulting in this error: GitLab pipeline error Below is a snippet of ...

webdriverIO encountered an unhandled promise rejection, resulting in a NoSuchSessionError with the message "invalid session id

I am currently learning how to conduct UI testing using Jasmine and WebdriverIO in conjunction with NodeJS. Below is a snippet of my test code: const projectsPage = require('../../lib/pages/projects.page'); const by = require('selenium-webdriver').By; ...

Executing Specific Test First Before All Others Using Specific Parameters - WDIO and Selenium

I'm currently working with WebDriverIO and I have a specific requirement: Execute a single test before any other tests (createNewUsers) Utilize certain capabilities (proxy settings) for this initial test Afterwards, switch to using default capabilit ...

Encountering a glitch while attempting to execute my test on webdriverio

Lately, I've encountered an issue while attempting to execute my webdriverio tests following an upgrade of my node version. The error message that now pops up is: 2022-01-11T12:45:05.628Z DEBUG @wdio/config:utils: Couldn't find ts-node package, n ...

Error: Module Not Found in Node.js

Hello everyone, I'm a newcomer to the world of JS and Node.js and I'm facing some issues while trying to set up a webdriverio project using cucumber and PageObject. Whenever I attempt to run a test, I encounter this error message: ERROR: Cannot ...

When attempting to initiate a new session, Webdriver.io receives an HTML response from selenium

Currently, I am attempting to execute my selenium tests using webdriver.io. However, the test runner is encountering failure when attempting to establish a session: [18:12:36] COMMAND POST "/session" [18:12:36] DATA {"desiredCapab ...

Is it possible to target a specific element within one of two classes that share the same name using CSS or XPath in Webdriver.IO?

Currently, I am using Webdriver.io and facing a challenge in selecting an element within the "text-fields-container" class. This particular element happens to be a password field, and both classes share the same name. Can someone guide me on how to go abou ...

$(...).parentElement is not a function - Troubleshooting a Problem with WebDriver IO and TypeScript

Alright, the objective is simple. I need to ascend from the root to obtain its parent element. Following the webdriver documentation, it should resemble something like this: it('should retrieve the class from the parent element', async () => { const el ...

WebdriverIO - string manipulation issue removing characters

I've encountered a strange issue while using the WebdriverIO functions setValue and addValue. It seems that whenever my string contains the number 3, it is mysteriously removed and not entered into the input boxes. I can manually type 3 into these inp ...

Discover the latest DOM elements using Webdriverio 5

Currently, I am developing a REact based CMS application that features a form with multiple carousels. I am encountering an issue where the webdriverio implementation is unable to locate an element, even though the same xpath works fine when tested manua ...

Running two different wdio.config.js files consecutively

Is it possible to run two wdio.config.js files with different configurations, one after another? Here is how the first configuration file is defined in the code: const { join } = require('path'); require('@babel/register') exports.config = { maxInst ...

Setting Up Appium Webdriverio

Can someone assist me in understanding the process of setting up a testing framework using Appium, Webdriverio, Node.js, and Jasmine? I have already set up my wdio.conf.js file: host: '127.0.0.1', port: 4723, path: '/wd/hub', .... specs: [ ' ...

Having difficulty identifying the same element during testing

Here is the code snippet I'm working with, which checks for expected text: console.log(typeof browser.getText('.modal.modal--primary.pin-container h1')); expect(browser.getText('.modal.modal--primary.pin-container h1')).toContain("Enter PIN"); The output ...

Encountering a getMacChromiumEdgeDriverArchitecture error while using wdio/selenium-standalone-service

As I continue to learn WebDriverIO and adjust to MacOS, I encountered an error while trying to execute a spec file using "npm run test:wdio". The error message is as follows: > [email protected] test:wdio /Users/vinicius.correia/Desktop/dev/automat ...

Installing selenium, chrome driver, and wdio alongside vagrant or docker integration

When I first tried to learn how to write automated tests for a small project, I faced some difficulties as things weren't working smoothly right from the start. After spending a couple of hours searching and experimenting, I finally found the correct confi ...

Is the webdriver.io waituntil method designed to return a boolean value of true or false

I am working on an automation framework using webdriver.io v5. I need to receive a boolean response from the code snippet below: waitAndCheckForContactToBePresent(contactName) { return browser.waitUntil((value) => { return this.chec ...

Setting up self-signed certificates for Selenium Standalone and WebdriverIO

Is there a way to configure Selenium Standalone and webdriverio to accept insecure self-signed certificates? I have been trying to find information on how to do this but haven't had any luck. Here is the code I am currently using: const assert = re ...

Having trouble extracting HTML output from a Selenium page when executing wdio.conf.js using the Selenium standalone service and Chrome browser

Upon running tests from wdio using the command 'wdio wdio.conf.js', an Error followed by html code of selenium page is being encountered. The package.json file contains the following configuration: { "name": "OpenWeathermap", "version": "1.0.0", "d ...

The test session failed to launch due to an error in initializing the "@wdio/cucumber-framework" module. Error message: [ERR_PACKAGE_PATH_NOT_EXPORTED]

I added @wdio/cli to my project using the command 'npm i --save-dev @wdiocli'. Next, I ran 'npx wdio init' and chose 'cucumber', 'selenium-standalone-service', 'typescript', 'allure' along with the default options for the rest. This process resulted in d ...

When using WebDriverIO in combination with VSC and JavaScript, any Xpath starting with //* is recognized as a comment

I'm in the process of creating a UI framework utilizing WebDriverIO within VSC. So far, everything is running smoothly, but I've encountered an issue where using XPath like the one below results in everything after //* being interpreted as a comm ...

The functionality of Webdriver.waitUntil is not meeting the expected outcomes

I'm currently utilizing webdriverio version 4.5: ./node_modules/.bin/wdio -v v4.5.2 In my scenario, I am in need of waiting for the existence of a specific element and handling the situation if it doesn't exist. Here is an example code snippet ...

Using Webdriverio and Selenium to implement Basic Authentication within Safari

I have been conducting experiments with a cloud computing service provider named LambdaTest for running Selenium and Appium tests while utilizing webdriverio. All of the company's websites utilize Basic Auth, and it seems like this method will remain ...

Exploring WebdriverIO: Mastering the Art of Iterating Through Elements Sharing Common Select

When using webdriverIO to retrieve an array of checkboxes within a specific div id, I utilized the following code: browser.elements('div[data-test-id="filter: inventory source"] input[type="checkbox"]').value; The result is as follows: [ { ELE ...