I stuck with click method in javascript. click is an asynchronous function but do not return any promise so I can not use await to solve it. The solution is to use callback but mine does not seem to work.
help me please.
Thank you.
example below.
document.getElementsByClassName("next-btn")[0].click(()=>console.log('this line should be printed after click done but it is not printed.'))