'Uncaught object' error when previously clicked element is removed from the DOM and it is an <a> or <area> element #8264
Labels
STATE: Issue accepted
An issue has been reproduced.
TYPE: bug
The described behavior is considered as wrong (bug).
What is your Scenario?
TestCafe (proxy mode) fails with 'Uncaught object' error on leaveElement when the prevElement is removed from the DOM, and it (or its parent, which is also removed) is an
<a>
or<area>
element. The issue happens because subsequent getParent hammerhead's code returns "host", which is a string representing the host in case of<a>
and<area>
elements, not an element. This causes a failure when attempting to get its parent again usingnativeMethods.nodeParentNodeGetter.call(el)
.From the user's perspective, it appears that TestCafe attempts to move the mouse very slowly to the next element and then fails with an
Uncaught object
error.Issue is not reproducible in native automation mode.
What is the Current behavior?
Test execution fails with error:
What is the Expected behavior?
Testcafe should execute test commands without error
What is the public URL of the test page? (attach your complete example)
Test page to reproduce the issue
What is your TestCafe test code?
Your complete configuration file
No response
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
npm install
npm run test
TestCafe version
^3.4.0
Node.js version
No response
Command-line arguments
testcafe chrome test.js --disable-native-automation
Browser name(s) and version(s)
No response
Platform(s) and version(s)
No response
Other
Tests running in proxy mode began failing after upgrading to version 3.4.0 or higher. The last version without this issue was 3.3.0.
I found that the issue is reproducible after the following change: DevExpress/testcafe#7995
If add removed code back, then test does not fail
Based on the description "removed IE leftovers from src\client\automation," it should not affect my tests as I run them in Chrome. However, it did affect them, so I reviewed the code that was originally executed for all browsers but was removed in that commit, and identified the issue.
The text was updated successfully, but these errors were encountered: