Webdriver.IO is reporting: "npm ERR! Test failed. Refer to the above for further information." However, the specific errors are not visible at the moment

Recently, I conducted a test to determine the number of breadcrumbs appearing on a specific website:

The website in question is:

The 2 breadcrumbs (highlighted in blue circle): breadcrumbs_screenshot

This was my testing approach: (with '[itemprop="item"]' as the CSS selector for breadcrumbs button)

it.only('Upper display shows the breadcrumbs', function () {
    let breadcrumbsAppearancesNumber = $$('[itemprop="item"]').length;
    expect(breadcrumbsAppearancesNumber).to.equal(2);
});

When tested with 2 breadcrumbs, the results were accurate.

However, out of curiosity, when I altered the test to check for 3 breadcrumbs:

it.only('Upper display shows the breadcrumbs', function () {
    let breadcrumbsAppearancesNumber = $$('[itemprop="item"]').length;
    expect(breadcrumbsAppearancesNumber).to.equal(3);
});

The test understandably failed, producing an output of "npm ERR! Test failed. See above for more details."

Upon reviewing the error messages, I couldn't find any additional information explaining why it failed...

The console displayed:

Stdout:

[Details of browser commands and operations]

Test Suites:     0 passed, 1 failed, 1 total (100% completed)

Time:            🕑  13.05s

npm ERR! Test failed. See above for more details.

Any insights on what might have caused this issue would be greatly appreciated!

Thank you!

Answer â„–1

Note: There is an issue that will be addressed in WebdriverIO Version 5, as mentioned on BUG#2639. This problem affects all setups using sync: true.

The project lead maintainer has provided insight on the situation:

Please note this issue will be resolved in v5 with a more simplified structure that should work correctly.

If anyone wishes to contribute to fixing this, feel free to submit a PR for the v4 branch. However, it is probable that this will be resolved in v5.


This behavior seems to be standard in your setup unless you incorporate additional reporters for enhanced detail. Refer to the Reporters section in the Official Guide for more information.

Other Options:

a.) You can improve verbosity at the assertion level by utilizing the optional msg parameter like this:

expect(breadcrumbsAppearancesNumber, `Found: ${breadcrumbsAppearancesNumber} breadcrumbs | Expected: 3 breadcrumbs`).to.equal(3);

b.) Alternatively, increase the log verbosity (logLevel: verbose) in your wdio.conf.js file:

exports.config = {
  // ...
  //
  // Level of logging verbosity: silent | verbose | command | data | result | error
  logLevel: 'verbose',
  //
  // ... 
};

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

Creating intricate mazes using canvas drawing techniques

I recently developed a maze generator as a personal project utilizing a graph. While the generation logic works perfectly, I am facing challenges when it comes to rendering the maze. In my approach, each cell is represented by an array of 4 edges where the ...

Creating a TypeScript NgRx effect for initiating an action

Hello all, I am relatively new to NgRx and so far most of my code is running smoothly. However, I've hit a roadblock with a specific issue and would appreciate some assistance. The problem I'm facing is related to the Login Effect being triggere ...

What could be the reason behind jQuery replacing the entire span with .text?

I am dealing with the following HTML code snippet: <p><input id="revenue" type="text" value="100000" /><span id="howmuch"><a href="" class="ka_button small_button small_cherry" target="_self" style="opacity: 1; "><span>How Mu ...

Having trouble with Vue Router view not functioning properly in my Laravel Blade page

While diving into the world of Vue.js, I encountered a perplexing issue. After successfully running ExampleComponent.vue in my admin panel and displaying its content, I attempted to import routes from an external file (new_route_list.js) and load them via ...

Unable to showcase the user roster in PUG/JADE

I have been working on displaying a list of users in PUB. Here is the code I am using: - var users = !{users}; h1 UserList for user in users a(href='/deleteuser/' + user.id) user.name user.surname Here is the rendering code: var u ...

Error encountered during Django ajax POST: CSRF token missing or incorrect

i am facing an issue sending a csv file and a bunch of data through ajax. I keep getting a Forbidden (CSRF token missing or incorrect) error even though I am sending the csrftoken. One more thing, I noticed that I am getting a different token in the code a ...

Guide on utilizing Vercel KV for storing and fetching posts from an API

Looking to optimize your API by utilizing Vercel KV for storing and retrieving posts? If you have a basic node.js express API that pulls random posts from MongoDB, the process of integrating Vercel KV can enhance performance. Initially, the API will resp ...

Designing a celestial light beam filter for the Effect Composer

I am currently working on transferring the god-rays demo code into an effect pass in order to seamlessly integrate it with other post-processing effects within the effect composer. However, I am facing an issue where the render function of the effect is no ...

Is this function not able to be called?

This particular JavaScript code is not hosted on my website. I am eager to execute the crocodile() function immediately without waiting for the 20-second delay currently in place. I am exploring options such as using the browser console, UserJS, or Seleni ...

Autonomous JQuery Modules

Is it possible to separate the functions in JQuery and use only the ones needed by splitting the file with PHP? By doing this, I aim to improve page speed, save bandwidth, and have more control over the functions used through the backend. Can the functio ...

What is the purpose of Access-Control-Allow-Headers in an HTTP response and why is it important to include it?

I've been working through a tutorial on using express and have come across the following routes: module.exports = function(app) { app.use(function(req, res, next) { res.header( "Access-Control-Allow-Headers", "x-ac ...

Label positioning for checkboxes

Is there a way to display the checkbox label before the actual checkbox without using the "for" attribute in the label tag? I need to maintain the specific combination of the checkbox and label elements and cannot use nested labels or place other HTML elem ...

The use of JQuery repeating fields can cause disruptions to the Bootstrap layout when removing rows

I have been struggling with a form that contains multiple fields that need to be repetitive. My current code is functional, but I'm encountering an issue where clicking on any remove button other than the first one causes the fields in the row to rear ...

Is there a way to extract the unicode/hex representation of a symbol from HTML using JavaScript or jQuery?

Imagine you have an element like this... <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo class="symbol">α</mo> </math> Is there a method to retrieve the Unicode/hex value of alpha α, which is &#x03B1, using JavaScrip ...

Transitioning from jQuery to AngularJS functions

I'm new to writing a jQuery function within AngularJs and could use some guidance. Any suggestions on the best approach for achieving this? Appreciate it! $(function() { $('.input input').focus(function() { $(this).parent('.in ...

Webpack can generate separate compiled files in addition to the bundle

Currently, I am utilizing the webpack loader ts-loader to convert typescript source files into a javascript bundle. My goal now is to not only save the compiled javascript bundle but also the individual compiled javascript files. While I have experience ...

Click to start viewing the video

I'm attempting to have a video play when clicked, either on the video itself or around the video. There are multiple videos on the page and I've tried various solutions including the script below which didn't work. $('video'). ...

CORS policy has prevented one of the functions on my webpage as there is no 'Access-Control-Allow-Origin' header on the requested resource

My webpage encountered an issue due to CORS policy: The 'Access-Control-Allow-Origin' header is missing from the requested resource. Any advice on how to handle this error would be greatly appreciated, thank you! Snippet of Webpage code: <ht ...

Navigating Redirects in WebDriver: A Step-by-Step Guide

Hello, I am a beginner when it comes to WebDriver, and I am finding the concept of a headless browser quite challenging to grasp. I was hoping to get some assistance with this... I understand that my project idea might not be the most conventional, but I ...

What is the best method for properly inserting images into a Vue Carousel 3D slider?

I'm currently exploring the Vue Carousel 3D documentation and I am having trouble displaying a single image on each slide. Let me elaborate: I aim to create a slider similar to the one shown in the Controls Customized example in the documentation. Th ...