I need to find a way to click on an invisible button in HTML. I attempted to use ClientFunction, however I encountered an error related to the element.
import { Selector,ClientFunction } from 'testcafe';
fixture('Clicking Invisible link').page('http://example.com');
test('Click on invisible link', async t => {
const viewProgram = Selector('tbody [viewBox]').nth(0);
const clickViewProgram = ClientFunction(() => viewProgram().click());
await clickViewProgram();
});
The specific error message I am receiving is:
An error occurred in ClientFunction code: ReferenceError: viewProgram is not defined
I would greatly appreciate any assistance in resolving this issue.