How do you paste from clipboard


I’m new to using katalon recorder and can’t work out how to paste from clipboard?

I’ve created a script that fills in a webform and as part of that a pop up appears with the option to copy a link.

The second half of the script types in data into a google form and I need to paste the link copied earlier that is on the clipboard.

Please help :frowning:

you have to store the link into a variable

(from Germany)

The Clipboard API in theory controls access to the system clipboard, but this has security controls around access to it.

The navigator.clipboard.readText() JavaScript command theoretically allows reading the clipboard and is cross-browser compatible, but i’ve not personally gotten this to work (and due to security controls, even testing this via dev. console won’t work, as it needs to be attached to DOM events, and via KAR, didn’t work out a solution either).

If KAR supported keyboard combinations you could have possibly used sendKeys to Control/Command + V the contents, but apparently this is a system-level operation, not browser-level, but at the moment, KAR only supports individual keys via SendKeys.

Hopefully, some of this information may be of use to you! :slight_smile: