click not working
See original GitHub issueSomething strange happens when testing my Bootstrap website using Nightwatch.
I have the following element in my page definition:
createAccountModalBackground: {
selector:'div.modal-backdrop'
}
In my test I execute the following code:
subscribePage
.click('@subscribeLiteButton')
.waitForElementVisible('@createAccountModal', 1000)
.waitForElementVisible('@createAccountModalBackground', 1000)
.click('@createAccountModalBackground')
The click never gets executed. The modal stays on screen.
If however I replace the click call with:
client.execute(function() {
document.querySelector('div.modal-backdrop').click()
})
It works fine.
Is there an issue somewhere?
Do you need more information?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
FIX: Mouse Moves but Cannot Click (Solved) - wintips.org
How to Troubleshoot Problems with your Mouse. · Step 1. Connect the mouse to another USB port. · Step 2. Shutdown and Restart...
Read more >Mouse Left-Click Button Not Working? Here's How to Fix It
On Windows 10, head to Settings > Devices > Mouse. Under “Select your primary button,” ensure the option is set to “Left.” On...
Read more >FIX: Mouse click not working in Windows 10/11
How can I fix the mouse clicking problem? · Run the Hardware and Devices troubleshooter · Boot in Safe Mode · Uninstall and...
Read more >Mouse Clicks Not Registering? 14 Proven Ways To Fix It
How to Fix Mouse Click Not Registering? · Change Buttons Configurations · Lower High CPU usage · Disable USB Selective Suspend · Uninstall...
Read more >Mouse pointer works but not able to click on Windows 10 / 11
a. If your mouse is working fine in 'Safe mode', then any of these third-party applications are causing the problem for you. Reboot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe element is hovered by other element or you need to scroll down to the element? That would explain why this works fine
Or you had luck and element disappear sometimes just after you check if the element is visible
Also, what do you mean
The click never gets executed. The modal stays on screen.? Is there any error?You are quick in closing this ticket, no? The line before doing this click I have:
.waitForElementVisible('@createAccountModalBackground', 1000)so why are you concluding that the element is not visible at the time of the click? If it isn’t visible that line should fail.edit: running my tests shows me:
Element <div.modal-backdrop> was visible after 48 milliseconds.