I have seen many questions regarding how to achieve equivalent of physical click using Javascript. While those methods work in simple use-cases, I have come across many complex UIs where I am unable to achieve the result of a physical click using Javascript event.
To give an example, in outlook calendar, when creating a new event, clicking the description box expands it and shows extra UI buttons. I am unable to get this effect no matter how many combinations of different events I try.
My question is: is it theoretically always possible to achieve a real equivalent of physical click using Javascript? Or am I wasting my time on something which is not possible?
Context: I am trying it using Chrome extension's content scripts.