Kaspresso. How type text in webView

250 Views Asked by At

I need type text in WebView in this editView

enter image description here

I try get input field like this:

val numberCard = UiEditText {
        withId("", "pan")
    }

But get error com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObjectException: The UiObject2 was not found on the screen. The selector=BySelector [RES='\Q:id/pan\E'], index=0 I can get label by text like this

val numberCard = UiEditText {
        withText("text_label")
    }

But type text not work for this

I also try use onWebView like this

        onWebView()
            .forceJavascriptEnabled()
            .withElement(findElement(Locator.ID, "pan"))
            .perform(webClick())
        device.keyboard.typeText("555")

But device.keyboard.typeText return error com.kaspersky.kaspresso.internal.exceptions.AdbServerException: AdbServer. The command=input text 5 was performed with timeout exception.

0

There are 0 best solutions below