M
M
Maxim K2020-08-27 12:52:13
C++ / C#
Maxim K, 2020-08-27 12:52:13

Why is queryselector not being executed?

Hello. There is a certain site with a login / pass input form - I execute the code:

chrome.ExecuteScriptAsync("document.getElementsByTagName('input')[2].value ='" +str_l + "'" + ";");


The string is formed correctly, i.e. took the entire line in the textbox - and checked through the console of the Chrome browser - it is successful.

And through CEF generally silence. input iterated from 0 to 10 - empty - no value is inserted into the field ((( What's wrong?

Such a request - works successfully:
chrome.ExecuteScriptAsync("document.querySelector('#username').value='" + str + "'" + ";");

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