An issue has arisen where a test that functions properly with selenium webdriver locally is timing out when executed remotely on saucelabs.com. Notably, the test runs smoothly for Chrome in both local and remote scenarios.
The problem seems to lie in the click
action within the client code:
var someLink = await driver.findElement(By.className('some-class'));
await someLink.click()
This setback occurs despite utilizing jest
as the testing framework with a 60-second timeout setting, resulting in a timeout error on the client side after one minute.
Upon reviewing the list of commands processed by Sauce Labs, it was observed that:
POST elements
With the following parameters:
{"using":"css selector","value":".some-class"}
and the corresponding response body:
[{"ELEMENT":"2"}]
This indicates that the element is successfully located. However, the subsequent click
event does not seem to be triggered. While prior click events and navigation commands are executed without issue.
In examining the video playback of the session, it is evident that the link is clicked and a new page loads in Firefox. Nevertheless, the spinner icon (a rotating dot) in the top right corner continues indefinitely.
Attempts to replicate the error using Firefox have been unsuccessful - even through manual testing on Saucelabs' platform where browser and virtual machine settings can be adjusted via the web interface.
The suspicion now centers on potential synchronous code causing an unresolved blockage. However, identifying this specific issue remains challenging given the lack of tools available in the developer console to track currently running blocking scripts.