mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[remote-driver] add DifferentProductLicenseKeyUiTest and ExpiredLicenseKeyUiTest
GitOrigin-RevId: c9acec027ce75c62e3b0ede0a76cbd9b2ef9cf1f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b8514db724
commit
c44138ebe8
@@ -0,0 +1,31 @@
|
|||||||
|
package com.intellij.driver.sdk.ui
|
||||||
|
|
||||||
|
import com.intellij.driver.client.Remote
|
||||||
|
import java.awt.event.KeyEvent
|
||||||
|
|
||||||
|
fun UiRobot.pasteText(text: String) {
|
||||||
|
driver.utility(ToolkitRef::class)
|
||||||
|
.getDefaultToolkit()
|
||||||
|
.getSystemClipboard()
|
||||||
|
.setContents(driver.new(StringSelectionRef::class, text), null)
|
||||||
|
keyboard {
|
||||||
|
hotKey(KeyEvent.VK_CONTROL, KeyEvent.VK_V)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Remote("java.awt.Toolkit")
|
||||||
|
interface ToolkitRef {
|
||||||
|
fun getDefaultToolkit(): ToolkitRef
|
||||||
|
fun getSystemClipboard(): ClipboardRef
|
||||||
|
}
|
||||||
|
|
||||||
|
@Remote("java.awt.datatransfer.Clipboard")
|
||||||
|
interface ClipboardRef {
|
||||||
|
fun setContents(content: StringSelectionRef, ownerRef: ClipboardOwnerRef?)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Remote("java.awt.datatransfer.ClipboardOwner")
|
||||||
|
interface ClipboardOwnerRef
|
||||||
|
|
||||||
|
@Remote("java.awt.datatransfer.StringSelection")
|
||||||
|
interface StringSelectionRef
|
||||||
Reference in New Issue
Block a user