Building for the Splunk Platform

Login failed by WebView2 JavaScript?


I try to login automatically by WebView2 JavaScript like below.


webView2.ExecuteScriptAsync("document.querySelector('#username').value = 'xxxx';");
webView2.ExecuteScriptAsync("document.querySelector('#password').value = 'yyyy';");
webView2.ExecuteScriptAsync("document.querySelector('body > div.account > div > div > div.account-login > form > fieldset > input.splButton-primary.btn.btn-primary').click();");


The code sets username and password correctly and click the "Sign In" button fine. However, I got "Login Failed" error.

Is there any tric to avoid auto login???


I am able to log in successfuly after just press "TAB" keys many times and click "Sign In" button without any change of username/password. it confusing me more...


Labels (1)
0 Karma

Super Champion

@kiyoshi_miyake - Try adding time delay.


I hope this helps!!

0 Karma


Hi @VatsalJagani , thanks for the reply. I tried adding delay, but i got same login failure. 😞

0 Karma
Get Updates on the Splunk Community!

Devesh Logendran, Splunk, and the Singapore Cyber Conquest

At this year’s Splunk University, I had the privilege of chatting with Devesh Logendran, one of the winners in ...

There's No Place Like Chrome and the Splunk Platform

WATCH NOW!Malware. Risky Extensions. Data Exfiltration. End-users are increasingly reliant on browsers to ...

Customer Experience | Join the Customer Advisory Board!

Are you ready to take your Splunk journey to the next level? 🚀 We invite you to join our elite squad ...