Splunk Dev

Login failed by WebView2 JavaScript?

kiyoshi_miyake
Explorer

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

VatsalJagani
SplunkTrust
SplunkTrust

@kiyoshi_miyake - Try adding time delay.

 

I hope this helps!!

0 Karma

kiyoshi_miyake
Explorer

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

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...

Operationalizing TDIR: Building a More Resilient, Scalable SOC

Optimizing SOC workflows with a unified, risk-based approach to Threat Detection, Investigation, and Response ...

Introducing .conf Stories Series!

“.conf Stories” Series – First Feature: Rich Mahlerwein   Every year .conf brings together some of the most ...