Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inform a user that a click was made on a wrong element #2930

Closed
AlexKamaev opened this issue Oct 4, 2018 · 7 comments · Fixed by #7289
Closed

Inform a user that a click was made on a wrong element #2930

AlexKamaev opened this issue Oct 4, 2018 · 7 comments · Fixed by #7289
Assignees
Labels
SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation.

Comments

@AlexKamaev
Copy link
Contributor

AlexKamaev commented Oct 4, 2018

When testcafe clicks an element which is overlapped by the second element, it waits for the first element to appear. If the first element do not appear during selector timeout period, then it clicks the second element.
It would be nice to inform users that a click is made on a wrong element.

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        #parent {
            position: relative;
        }

        #child1 {
            width: 100px;
            height: 100px;
            background-color: blue;
            position: absolute;
            top: 0;
            left: 0;
        }

        #child2 {
            width: 400px;
            height: 400px;
            background-color: red;
            position: absolute;
            top: 0;
            left: 0;
        }
    </style>
</head>
<body>
    <div id="parent"></div>
    <div id="child1"></div>
    <div id="child2"></div>
</body>
</html>
fixture `fixture`
    .page `../pages/index.html`;

test(`test`, async t => {
    await t
        .click('#child1');
});
@AlexKamaev AlexKamaev added TYPE: enhancement The accepted proposal for future implementation. SYSTEM: automations labels Oct 4, 2018
@AlexSkorkin AlexSkorkin changed the title inform a user that click was made on wrong element Inform a user that a click was made on a wrong element Oct 5, 2018
@AlexKamaev
Copy link
Contributor Author

#2861
Sometimes we cannot click on element inside a shadow root. See #2861 tests

@AndreyBelym AndreyBelym moved this from UX to Error, Edge case handling & Timeouts & Graceful degradation in Enhancements processing Mar 1, 2019
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.

@github-actions github-actions bot added the STATE: Stale An outdated issue that will be automatically closed by the Stale bot. label Nov 12, 2020
@github-actions
Copy link

We're closing this issue after a prolonged period of inactivity. If it still affects you, please create a new issue with up-to-date information. Thank you.

Enhancements processing automation moved this from Error, Edge case handling & Timeouts & Graceful degradation to Closed Nov 22, 2020
@AndreyBelym AndreyBelym reopened this Nov 22, 2020
Enhancements processing automation moved this from Closed to NEEDS TRIAGE Nov 22, 2020
@github-actions
Copy link

github-actions bot commented Dec 6, 2020

We're closing this issue after a prolonged period of inactivity. If it still affects you, please create a new issue with up-to-date information. Thank you.

@github-actions github-actions bot closed this as completed Dec 6, 2020
Enhancements processing automation moved this from NEEDS TRIAGE to Closed Dec 6, 2020
@rob4629
Copy link
Contributor

rob4629 commented Nov 12, 2021

Can this be re-opened? I believe it still happens (we're seeing it occur on some of our tests while running against BrowserStack's iPhone 8.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 12, 2021
@viktoria2506 viktoria2506 reopened this Nov 18, 2021
@viktoria2506 viktoria2506 removed STATE: Need response An issue that requires a response or attention from the team. STATE: Stale An outdated issue that will be automatically closed by the Stale bot. labels Nov 18, 2021
@jbradenclickfunnels
Copy link

This is also an issue for us when we have a dynamic notification box display on top of elements we need to click. Instead of failing the test, TestCafe continues to find the element and try to interact with it again and again creating an infinite loop.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Dec 17, 2021
@AlexSkorkin AlexSkorkin removed the STATE: Need response An issue that requires a response or attention from the team. label Dec 22, 2021
@github-actions
Copy link

Release v2.0.2-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

8 participants