Click activity to copy does not work in Firefox

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:

  1. in Chrome browser, and
  2. if button is clicked manually in Firefox

How do I resolve this?

Hello @abhinav_bhardwaj,

Maybe you could try with “Get Text Activity”. The text will be saved in the variable you create with the activity.

Yes, thank you. That is possible. But for the sake of practice lesson I wanted to know if there is an alternate for Firefox activity specific to this task.