[driver] improve not clear error message in waitNotFound

GitOrigin-RevId: 3fbd54cc694496dc7d59e3adedf9fc4ec9596a34
This commit is contained in:
Anastasia Katsman
2025-09-25 19:19:51 +00:00
committed by intellij-monorepo-bot
parent de3016a36c
commit 72e2a2b77b
@@ -81,7 +81,7 @@ open class UiComponent(private val data: ComponentData) : Finder, WithKeyboard {
* @param timeout The maximum time to wait for the element to not be found. If not specified, the default timeout is used.
*/
fun waitNotFound(timeout: Duration? = DEFAULT_FIND_TIMEOUT) {
waitFor(message = "No ${this::class.simpleName}[xpath=${data.xpath}] in ${data.parentSearchContext.contextAsString}",
waitFor(message = "There should be no ${this::class.simpleName}[xpath=${data.xpath}] in ${data.parentSearchContext.contextAsString}",
timeout = timeout ?: DEFAULT_FIND_TIMEOUT,
interval = 1.seconds) {
!present()