I was working on the UI automation practice lesson wherein the need is to click a button on a website which copies text to clipboard.
With the Click activity, it gives out an error in Firefox console “document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler”. The text does not get copied to clipboard.
It works fine:
- in Chrome browser, and
- if button is clicked manually in Firefox
How do I resolve this?