N
N
NINFERIO2021-05-06 18:58:50
JavaScript
NINFERIO, 2021-05-06 18:58:50

How to insert text into input field on website in WebView?

There is an application with WebView which opens a site.
I successfully implemented the button click:

webView.loadUrl("javascript:document.getElementsByClassName('btn-toolbar btn-toolbar-lg btn-login')[0].click()");

But filling the text field is not successful. a white window opens with my value text.
webView.loadUrl("javascript:document.getElementsByName('username').value = 'Допустим логин'");

What is strange, everything works in C# in wpf. How to be?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question