I am trying to use javascript to fill in input boxes with user and pw but I cannot get the commands to work in my application. I can open chrome and run the same commands from the console and they work. My code is below:
Dim oBrowser As WinForms.ChromiumWebBrowser = CType(sender, WinForms.ChromiumWebBrowser)
If Not oBrowser.IsLoading And docready = True Then
oBrowser.SetZoomLevel(-0.7)
oBrowser.ExecuteScriptAsync("document.getElementsByName('userName').item(0).value = " & """" & "test" & """")
End If
If I run this command in my chrome console it works fine.
document.getElementsByName('userName').item(0).value = "test"
I can do other javascript commands like creating an alert but it seems not all of my functions are working like they should. I have tried to simply select() the element, then focus(), nothing seems to respond. Is there something that needs to be declared to make this work?
Kinda lost here. could use some help.