I am doing some visual testings using Testcafe (Typescript) I would like to hide some DOM elements during the screenshots creation
import { Selector } from 'testcafe';
fixture`Getting Started`
.page`https://mypage.com`;
test('My first test', async t => {
// select certains elements before
await t.takeScreenshot()
});
A visual exemple would be
To go from this image

Any suggestion on how to do this apart from "reinventing the wheel" hard coding some pixel selection code ? Thanks

You can use
ClientFunctionand hide the element manually with JS.Also, you can use
clientScriptshook forfixtureorclientScriptshook fortestin the same way.