TypeError: Cannot read properties of null (reading 'focus')
Unable to click elements by using its attributes in cypress tests.
Expected behaviour
click or interact with an element with its title attribute
Current behaviour
when we are interacting with an element with one of its attribute Cannot read properties of null (reading 'focus')
pops up
Steps to reproduce
- switch to cypress-tests branch.
-
npx cypress open
command in the terminal opens cypress - Run the test Test02_question.cy.js
- In
checking the wax editor
test of file Test02_question.cy.js , while clicking the show more tools icon. The error(uncaught exception)TypeError: Cannot read properties of null (reading 'focus')
pops up. here line 8 of the tests log in the screenshot is the result ofcy.get('button[title="Show more tools"]').invoke('attr', 'title').should('eq', 'Show more tools')
which verifies that the element with the title attribute of "Show more tools" exists.
Environment
[Electron v100 in Mac ]
Possible solution
[Not required. Suggest a fix for the bug]