testcafe-hammerhead: TypeError: Cannot read property 'className' of undefined
What is your Test Scenario?
Hello!
I’m having a hard time to click on some old Angular JS components (buttons) when using most recent versions of TestCafe. Here is an example of a button that TestCafe cannot click:
<button class="uiid-onboard-employee-button btn btn-primary mg_r20 wd_160" promise-button="vm.saveAddEmployee()" > {{vm.saveButtonText}} </button>
I can only click on the button above when using TestCafe version 1.1.0
, I’ve tried several versions after this (including latest 1.3.3
) but when TestCafe clicks on the button, nothing happens and the following error is thrown in my Chrome Console:
I noticed that all buttons that I have issues have this promise-button
attribute.
What is the Current behavior?
Only TestCafe 1.1.0
can click on the buttons above.
What is the Expected behavior?
I’d expect latest versions of TestCafe to be able to click successfully.
What is your web application and your TestCafe test code?
Your website URL (or attach your complete example):
Your complete test code (or attach your test files):
Your complete configuration file (if any):
Your complete test report:
Screenshots:
Steps to Reproduce:
- Go to my website …
- Execute this command…
- See the error…
Your Environment details:
- testcafe version:
- node.js version:
- command-line arguments:
- browser name and version:
- platform and version:
- other:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 19 (8 by maintainers)
Commits related to this issue
- fix `TypeError: Cannot read property 'className' of undefined` (close #2099) — committed to LavrovArtem/testcafe-hammerhead by LavrovArtem 5 years ago
- fix `TypeError: Cannot read property 'className' of undefined` (close #2099) — committed to LavrovArtem/testcafe-hammerhead by LavrovArtem 5 years ago
Hi @rodrigotolledo
I cannot provide you with a precise time frame. The current development sprint is already planned. We will consider this issue during planning the next development sprint.
Hi all,
Just wondering if we have any idea when this issue will be addressed?
Once this issue is fixed, we will finally be able to upgrade to latest TestCafe. Still stuck with version
1.1.0
.Feel free to hit me up if you need any additional details.
Cheers!
The problem occurs if there is a form with
<input type=file>
and the script calls the `form.getElementsByTagName(‘*’) and iterates over the resulting collection.Input type=“file” broke the automated testing with latest version of the testcafe
@rodrigotolledo
After we fix the issue, you will be able to pass your test case with an updated
testcafe
version. Please stay tuned for updates in this thread.