question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'className' of undefined

See original GitHub issue

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:

error-when-dealing-with-promise-button - Copy

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:

  1. Go to my website …
  2. Execute this command…
  3. See the error…

Your Environment details:

  • testcafe version:
  • node.js version:
  • command-line arguments:
  • browser name and version:
  • platform and version:
  • other:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
miherlosevcommented, Aug 23, 2019

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.

1reaction
rodrigotolledocommented, Aug 22, 2019

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'className' of undefined - Stack Overflow
The following error is being thrown in Google Chrome's developers tools: Uncaught TypeError: Cannot read property 'className ...
Read more >
TypeError: Cannot read property 'className' of Null in JS
The "Cannot read property 'className' of null" error occurs when accessing the classList property on a variable that stores a null value. To...
Read more >
[Tooltip] TypeError: Cannot read property 'className ... - GitHub
I am getting this error. Code is crashing. https://codesandbox.io/s/basictooltip-material-demo-forked-7ftwd Here are my imports: import * as ...
Read more >
Cannot read property 'className' of undefined - React
Uncaught TypeError: Cannot read property 'className' of undefined at removeClass at SwitchComponent, DocumentEditor and more .
Read more >
Cannot set property 'className' of undefined : r/learnjavascript
if a variable has been declared, but has not been assigned a value, is automatically assigned the value undefined . Therefore, if you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found