-
Notifications
You must be signed in to change notification settings - Fork 674
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
The element that matches the specified selector is not visible. #1994
Comments
Hi @zac156, Thanks for your report. I've reproduced the issue. ...
.expect(page2ComlpleteHeading.innerText).eql('Review Your Booking')
.expect(Selector("#submit-id-book_appointment").value).eql("Next");
// With debug uncommented and then applying next step this works
// await t.debug();
await t
.expect(Selector("#submit-id-book_appointment").visible).ok()
.click(Selector("#submit-id-book_appointment")); The issue is occurred because of the following reason: when TestCafe is going to click on the Here is a simple example to reproduce the issue: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input id="target" value="input" style="visibility: hidden;"/>
<script>
window.setTimeout(function () {
const input = document.getElementById('target');
const parent = input.parentNode;
parent.removeChild(input);
const newInput = document.createElement('input');
newInput.id = 'target';
newInput.value = 'new input';
document.body.appendChild(newInput);
}, 2000);
</script>
</body>
</html> fixture `gh-1994`
.page `http://localhost:8080/`;
test(`gh-1994`, async t => {
await t.click('#target');
}); |
Great thank you, the work-around worked for now too |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
Are you requesting a feature or reporting a bug?
Reporting a bug
What is the current behavior?
I am certain that my element is visible and have done the necessary tests. Debugging works. If I do
await t.debug()
and then step over behaviour as expected.What is the expected behavior?
Expecting element to be visible and once click is supplied to Selector for action to work but instead fails and I am getting this:
How would you reproduce the current behavior (if this is a bug)?
Please run JS code below
Tested page URL:
https://sweepsouth.com/book
Test code
Specify your
The text was updated successfully, but these errors were encountered: