Hello guys,
I am trying to paste text from clipboard to address bar. We have action, which copies automatically text when clicked.
I have found only this way, using Java ROBOT for CTRL+L (select address bar) and CTRL+V (paste clipboard). But WebUI doesn’t wait for this action. How can I solve this problem?
.
import java.awt.Robot
import java.awt.event.KeyEvent
*some Katalon codes*
.
*Robot robot = new Robot()*
*robot.keyPress(KeyEvent.VK_CONTROL)*
*robot.keyPress(KeyEvent.VK_L)*
*robot.keyRelease(KeyEvent.VK_CONTROL)*
*robot.keyRelease(KeyEvent.VK_L)*
*robot.keyPress(KeyEvent.VK_CONTROL)*
*robot.keyPress(KeyEvent.VK_V)*
*robot.keyRelease(KeyEvent.VK_CONTROL)*
*robot.keyRelease(KeyEvent.VK_V)*
*robot.keyPress(KeyEvent.VK_ENTER)*
How about adding WebUI.waitForPageLoad(10)
after the last robot command?
Also, just a note that you cannot be playing with your mouse or keyboard at the same time as the robot commands are being run.
1 Like
why don’t you just retrieve the clipboard data as a string and use navigateToURL?
see: http://www.avajava.com/tutorials/lessons/how-do-i-get-a-string-from-the-clipboard.html
1 Like
@duyluong @ThanhTo @devalex88
Feature request for KS 8.x
WebUI.ClipboardCopy
Copy specified text to the clipboard
WebUI.ClipboardPaste
Copy clipboard content to specified target
WebUI.ClipboardVerify
Verify clipboard content with specified target content
Fail if different. Less useful.
WebUI.ClipboardClear
Clear the clipboard content
1 Like
So that we don’t derail this thread: WebUI Clipboard API set
You just made an infinite loop 
1 Like
The exit point will be ‘feature implemented’
Thank you @anon46315158. I just added this function as Keyword. And worked for me.
I have tried this option, but doesn’t work