# How do I paste from clipboard?

**URL:** <https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370>\
**Category:** Web Testing\
**Tags:** katalon-recorder\
**Created:** [March 2, 2019, 11:51am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370 "2019-03-02T11:51:14Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![hb7of9](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/hb7of9/32/2378_2.png) [@hb7of9](https://forum.katalon.com/u/hb7of9)\
**Post date:** [March 2, 2019, 11:51am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/1 "2019-03-02T11:51:14Z")

</div>

How to I paste from clipbpard?

---

<div class="post-metadata">

**Author:** ![hb7of9](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/hb7of9/32/2378_2.png) [@hb7of9](https://forum.katalon.com/u/hb7of9)\
**Post date:** [March 2, 2019, 12:14pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/2 "2019-03-02T12:14:24Z")

</div>

!{clipboard} \<\<\< does not work

---

<div class="post-metadata">

**Author:** ![d.semenduev](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@d.semenduev](https://forum.katalon.com/u/d.semenduev)\
**Post date:** [July 8, 2019, 9:52am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/8 "2019-07-08T09:52:42Z")

</div>

Looks like Katalon can not operate the clipboard other than through shortcut keys combinations. I also struggled with getting value from clipboard, and in the end came up with an idea of importing java libs Katalon is using, and save clipboard data to a variable in test case script:

```auto
import java.awt.Toolkit
import java.awt.datatransfer.DataFlavor

...

String my_clipboard = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null).getTransferData(DataFlavor.stringFlavor);

// use my_clipboard variable where it is relevant

```

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [July 8, 2019, 3:00pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/9 "2019-07-08T15:00:29Z")

</div>

Use selenium:

```
WebElement element = WebUiCommonHelper.findWebElement("path/to/my/test/object", 30);
element.sendKeys(Keys.chord(Keys.LEFT_CONTROL, "v"));
```

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [July 8, 2019, 4:50pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/10 "2019-07-08T16:50:15Z")

</div>

Guys - this is for Katalon **Recorder** (not Studio).

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [July 8, 2019, 4:55pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/11 "2019-07-08T16:55:16Z")

</div>

Nice catch. My bad 🙄

---

<div class="post-metadata">

**Author:** ![d.semenduev](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@d.semenduev](https://forum.katalon.com/u/d.semenduev)\
**Post date:** [July 9, 2019, 5:50am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/12 "2019-07-09T05:50:41Z")

</div>

I am not sure this does what is needed. In your example you will just paste clipboard into an element on the website you are working on atm. And what is needed sometimes is to save clipboard value into a variable for further use.

---

<div class="post-metadata">

**Author:** ![Ibus](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@Ibus](https://forum.katalon.com/u/Ibus)\
**Post date:** [July 9, 2019, 10:25am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/13 "2019-07-09T10:25:58Z")

</div>

if using variables, why to use clipboard?

---

<div class="post-metadata">

**Author:** ![Brandon\_Hein](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brandon_hein/32/1092_2.png) [@Brandon\_Hein](https://forum.katalon.com/u/Brandon_Hein)\
**Post date:** [July 9, 2019, 7:54pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/14 "2019-07-09T19:54:33Z")

</div>

This is not what the OP asked for:

> [@hb7of9](#):
>
> How to I paste from clipbpard?

The target of his paste is not mentioned. He makes no mention of saving anything to a variable.

---

<div class="post-metadata">

**Author:** ![Ibus](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@Ibus](https://forum.katalon.com/u/Ibus)\
**Post date:** [July 10, 2019, 10:14am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/15 "2019-07-10T10:14:43Z")

</div>

@d.semenduev if you have specific needs (maybe similar with the actual topic but with more scenarios) you can open a new one, more descriptive.  
imho the actual one is solved … as no solution found 😃

also you din’t pay attention at …

> Guys - this is for Katalon **Recorder** (not Studio).

---

<div class="post-metadata">

**Author:** ![utester555](https://avatars.discourse-cdn.com/v4/letter/u/e47774/32.png) [@utester555](https://forum.katalon.com/u/utester555)\
**Post date:** [June 16, 2020, 6:37am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/16 "2020-06-16T06:37:58Z")

</div>

Wow…this worked for me. Thanks a lot… @d.semenduev

---

<div class="post-metadata">

**Author:** ![brunoms773](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/brunoms773/32/16104_2.png) [@brunoms773](https://forum.katalon.com/u/brunoms773)\
**Post date:** [May 30, 2022, 3:12pm UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/17 "2022-05-30T15:12:37Z")

</div>

Hello, if you want to copy some value of the site i suggest using Robot.  
Do a doubleClick on the element to select, then use Robot to do Ctrl+C (this will put the value in the clipboard).  
This piece of code will execute the copy

Robot robot = new Robot()  
robot.keyPress(KeyEvent.VK\_CONTROL)  
robot.keyPress(KeyEvent.VK\_C)  
robot.keyRelease(KeyEvent.VK\_CONTROL)  
robot.keyRelease(KeyEvent.VK\_C)

Then you can use the clipboard

---

<div class="post-metadata">

**Author:** ![nina](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nina/32/22830_2.png) [@nina](https://forum.katalon.com/u/nina)\
**Post date:** [June 1, 2023, 2:07am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/18 "2023-06-01T02:07:12Z")

</div>

HI  
Is there any update on the ability to user Control+V using a mac in Katalon Studio?

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [June 1, 2023, 2:10am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/19 "2023-06-01T02:10:20Z")

</div>

Hi there Nina,

Welcome to Katalon Community! 👋

As this topic was dedicated for Katalon Recorder, we thought it would be better if you create another topic in #Katalon Studio, and be sure to check out our global posting guideline below so that we, and other members, can support you more effectively…

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

Thanks!

---

<div class="post-metadata">

**Author:** ![qa.monica](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/qa.monica/32/23870_2.png) [@qa.monica](https://forum.katalon.com/u/qa.monica)\
**Post date:** [October 31, 2023, 7:11am UTC](https://forum.katalon.com/t/how-do-i-paste-from-clipboard/20370/20 "2023-10-31T07:11:58Z")

</div>

Mobile.sendKeys(findTestObject(‘elementaddress’), Keys.chord(Keys.CONTROL, ‘v’) )
