mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui-tests] Add step on text typing
GitOrigin-RevId: dd41a0d6ea7da176462e7fb18e5bb059145dd702
This commit is contained in:
committed by
intellij-monorepo-bot
parent
770e6852d9
commit
04814724b8
+7
-4
@@ -1,5 +1,6 @@
|
||||
package com.intellij.driver.sdk.ui.keyboard
|
||||
|
||||
import com.intellij.driver.sdk.step
|
||||
import com.intellij.driver.sdk.ui.remote.Robot
|
||||
import com.intellij.openapi.diagnostic.logger
|
||||
import java.awt.event.KeyEvent
|
||||
@@ -74,10 +75,12 @@ class RemoteKeyboard(private val robot: Robot) {
|
||||
}
|
||||
|
||||
fun enterText(text: String, delayBetweenCharsInMs: Long = 50) {
|
||||
LOG.info("Entering text '$text'.")
|
||||
text.forEach {
|
||||
robot.type(it)
|
||||
Thread.sleep(delayBetweenCharsInMs)
|
||||
step("Type text '$text'") {
|
||||
LOG.info("Entering text '$text'.")
|
||||
text.forEach {
|
||||
robot.type(it)
|
||||
Thread.sleep(delayBetweenCharsInMs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user