Property 'click' does not exist on type 'MutableRefObject<null>'.ts(2339) code example
Example: simulate click typescript
let element: HTMLElement = document.getElementsByClassName('btn')[0] as HTMLElement;
element.click();
let element: HTMLElement = document.getElementsByClassName('btn')[0] as HTMLElement;
element.click();