How should one proceed when webdriverjs fails to trigger a continuation and remains stuck in limbo?

Currently encountering a peculiar issue with webdriverjs where it unexpectedly halts and appears to cease running events. My setup involves using webdriver to launch a new browser, after which the code in that browser links up to the webdriver session to execute test commands.

Initially, everything seems to be functioning as expected. However, certain sequences of commands cause webdriver to get stuck. For instance, in my test case:

driver.findElement(my_element).then(function(element) {
  console.info("found");
  element.getTagName().then(function(name) {
    console.info("got tag name", name);
  });
});

In this scenario, the browser prints out the first "found" message, but not the subsequent "got tag name". Strangely, there are no errors reported in the logs, and even if I set an errback for the getTagName promise, it never triggers. It’s like the event just does not occur.

The webdriver instance is running on a selenium-standalone-server. By examining its logs, I notice the initial findElement request being made:

12:59:43.382 INFO - Executing: [execute script: return (function lookupElement(id) {
  var store = document["$webdriver$"];
  if(!store) {
    return null
  }
  var element = store[id];
  if(!element || element[id] !== id) {
    return[]
  }
  return[element]
}).apply(null, arguments);, [51d37tw]] at URL: /session/1337200865492/execute)
12:59:43.393 INFO - Done: /session/1337200865492/execute

However, the second request is missing, indicating that webdriver JS may not be triggering the server call as intended.

I am currently debugging through the webdriver code to identify the root cause, but due to the extensive use of closures in the promise framework, inspecting the state proves challenging. Has anyone encountered a similar issue and can offer insights?

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

Leverage OpenID Connect in Azure Active Directory with authentication code flow

Currently, I am developing an authentication system for a NodeJS and Express web application that requires users to be directed to Microsoft SSO. To achieve this, I am utilizing passport-azure-ad and OpenID Connect. My main query is - Is it mandatory to ...

Having trouble setting up Node.js on a Mac computer

Upon completing the regular installation on Mac, I am unable to find Node in the terminal. Even after defining the PATH with the line: export PATH=/usr/local/bin: $PATH, it still does not locate Node or npm in the terminal. ...

What is the process of obtaining the 'state' of an element in python-selenium?

When working with python-selenium, there are two approaches to locate an element. The first method involves using the find_element method directly, for example: element = find_element_by_xpath(myxpath) The second method utilizes the WebDriverWait to ens ...

Add custom scripts to individual components within a Vue.js application

After extensive searching, I still can't seem to find a solution to my current issue. My focus is on a Vue project with vue-cli, where I need to inject various scripts into different pages (leveraging vue-router). Here are more specific details: Thi ...

Troubleshooting video streaming loading issues caused by 404 errors in URL paths with videojs

I've been successfully using the video.js library to stream live video. Everything was going well until after a while, the URL started throwing a 404 error during streaming, causing the entire player to get stuck on loading. Now I'm looking for a ...

Exploring Fetch API with Promise.all

I have successfully implemented a functionality that fetches data from two URLs and performs an action only when both requests are successful. However, I am curious if there is a more efficient and succinct way to achieve the same result. Helper functions ...

Can you explain the functionality of driver.navigate().to() in Selenium? Specifically, I am curious about the purpose and usage of navigate() and

I'm feeling a bit confused right now. Whenever we create an object of a class, we are able to access its properties and methods. That part I understand. However, when we create an object of the WebDriver class in Selenium and set a URL using driver.na ...

Finding the smallest value for each day in MongoDB using Mongoose

I have a collection in my MongoDB database called measured_data that includes entries for each day containing the fields measured_at and value. I am looking for a way to use Mongoose to find the lowest value recorded for each day. Any insights or suggest ...

An alert box displays N times when the submit button is clicked N times

Consider the following function: function validateForm() { var elements = ["firstname", "lastname", "password", "favfood", "favsport"]; document.getElementById('register').setAttribute('noValidate', true); document.getElement ...

Encountering a problem while trying to pin a message on Discord

Whenever a message is pinned in discord, it causes the bot to crash with the following error (although it can recover with forever but that's beside the point). The pinned message can be of any type (regular or embed). if (!value) throw new RangeE ...

How can I retrieve an empty object from the database using Angular 5?

Hey there! I'm facing a little issue that I need help solving. I asked a question before when things weren't clear, but now they are (you can find the previous question here). I'll share my code and explain what I want to achieve shortly. H ...

Unable to adjust the dimensions of the image

I recently added two images to my website successfully, but I am facing an issue when attempting to modify their dimensions and shape using CSS. Despite adjusting the height, width, border-radius, etc., the images remain unchanged. Can anyone provide insig ...

Exploring how AngularJS can utilize the $resource API for handling HTTP

http://docs.angularjs.org/api/ngResource.$resource In the provided link, an example is given as follows: // Defining a CreditCard class var CreditCard = $resource('/user/:userId/card/:cardId', {userId:123, cardId:'@id'}, { charge: ...

Is there a way to utilize JQuery to identify and update the contents of a specific element?

My current structure is as follows: <div class="button"> <a href="/" target="_blank" class="test">Photos</a> </div> How can I use JQuery to select .button and remove the target="_blank" attribute from the html? I managed to reac ...

Issue with Angular 1.5.x - Directive not triggering

Currently, I am honing my skills in working with directives and have been struggling with this particular issue for quite some time. The snippet of code that is causing me trouble is as follows - Module angular.module('wbHeader', []); Contro ...

Retrieve information using Observables just once in Angular 2

One of my Angular 2 components relies on a service that fetches customer data from a Web API and returns an Observable: getCustomers() { return this.http .get(this.baseURI + this.url) .map((r: Response) => { let a = r.jso ...

What are the best practices for utilizing intro.js effectively on mobile devices?

Description When using introjs on mobile devices with a screen width of less than 600px, the tooltip ends up covering the element. When I hold the device horizontally, the tooltip adjusts its position accordingly. I attempted to apply custom CSS to the too ...

What does it mean to have the "onload" event in the <body> tag of HTML and JavaScript?

I'm curious to know if "onload" is an attribute of the <body> tag in HTML. I came across this code snippet while reading a book on JavaScript. <html> <body onload="alert('hi')";> ... </body> </html&g ...

Challenge encountered when attempting to incorporate a heart icon into Bootstrap 5 Carousel

I'm facing an issue with the heart/favorites icon in the Bootstrap 5 carousel. How can I make it change from filled (red) to empty (white) when clicked? <div id="myCarousel" class="carousel slide" data-bs-ride="carousel&quo ...

Automatically resizing images in a canvas when their resolution exceeds the canvas size in HTML5

I am currently using Html5, fabric.js, and JavaScript to upload multiple images to a canvas. However, there are instances where the uploaded image size exceeds that of the canvas. I am looking for a way to ensure that the image is set to a fixed size. v ...