Description: The bug has been introduced preventing the customer to click on an element that he was would be supposed to click
How? Steps explanation: Here is what happens on our payment page application after implementing the Dialog HTML tag in our modal:
- The user clicks the submit button
- The first popup appears containing a iframe
- After a second the second popup appears containing a second iframe behind the first popup.
Browsers that we used: chrome and firefox.
Expected behavior in testcafe: Testcafe shouldn’t be able to click this “checkout” button like a real user Actual behavior in testcafe: Green test against the bug Testcafe allowing the click on the button on popup in background. Because it interacts with the button even if overlapped by another element Dialog HTML tag in our modal component
After the test getting this warning message from testcafe:
When something overlaps the action target, TestCafe performs the action with the topmost element at the original target's location.
The following element with a greater z-order replaced the original action target: <dialog class="payment_1PLVocjJ" open="" tabindex="-1">...</dialog>.
Review your code to prevent this behavior.
We’ve used visible and exist functions to prevent this behavior in our tests but didn’t work because following factors do not influence the element’s visibility status in testcafe:
- The element’s z-index
- The element’s opacity
- The element’s position on the page
Question:
How can I prevent or catch this bug by using which function?
Thanks in advance!