Fix existing integration test#8854
Conversation
There was a problem hiding this comment.
Code Review
This pull request fixes an integration test by updating a call from isVisible() to present() and speeds up text input by reducing the delay between characters. This is a good improvement for test stability and speed. Regarding your question about pasting text, it is indeed possible and would be faster. You can achieve this by using driver.utility(RobotService::class).copyToClipboard(text) to place text on the clipboard, and then simulating a paste with keyboard.hotKey(...) using the appropriate keyboard shortcut for the OS (e.g., Cmd+V on macOS).
|
@gemini-code-assist is there a way to copy and paste without being platform-specific? |
|
That's a great question, helin24! Achieving truly platform-agnostic copy-paste functionality in UI automation can indeed be challenging due to differences in operating system clipboard mechanisms and UI frameworks. When dealing with UI automation, especially for desktop applications or IDEs, direct "paste" actions often rely on simulating keyboard shortcuts (like Here are a few common approaches and considerations:
Given your current setup, continuing to use |
…t.kt Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
(FWIW: I think direct text input will be more robust than copy-paste. It is super slow though!) |
The
isVisiblefunction was not found; I expect maybe it was from a previous version of dependencies or something. I also specified ms between text input because it feels very slow. I don't see an option to just paste with the keyboard but maybe that exists elsewhere.