Hello,
I execute the following:
and nothing happens, if I right click on the WebView and choose "Open Frame In New Window", then if the input is filled
What I want is to make an automatic Login
The Input is in nested frame.
My code:
Please help me.
I execute the following:
B4X:
js.evalString("doc.getElementById('LoginPh').value = 'plant';")
and nothing happens, if I right click on the WebView and choose "Open Frame In New Window", then if the input is filled
What I want is to make an automatic Login
The Input is in nested frame.
My code:
B4X:
#Region Project Attributes
#MainFormWidth: 800
#MainFormHeight: 650
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private we,temp As JavaObject
Private wv1 As WebView
Private startPage As String = "http://111.111.111.111"
Private doc As JavaObject ' JavaObject library
Private js As jScriptEngine ' jScriptengine library
Dim codigo As String
Private corr As TextField
Private grado As TextField
Private grado As TextField
Private almidon As TextField
Private conv1 As TextField
Private cliente1 As TextField
Private mat1 As TextField
Private conv2 As TextField
Private cliente2 As TextField
Private mat2 As TextField
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
we.InitializeNewInstance("javafx.scene.web.WebEngine",Null)
doc.InitializeStatic("org.w3c.dom.Document")
MainForm.RootPane.LoadLayout("principal") 'Load the layout file.
temp = wv1
we = temp.RunMethod("getEngine",Null)
wv1.Enabled = True
wv1.Visible = True
we.RunMethod("load",Array As Object(startPage))
MainForm.Show
End Sub
Sub wv1_PageFinished (Url As String)
js.enginePut("doc",we.RunMethod("getDocument",Null))
js.evalString("var t = doc.body.innerHTML;")
js.evalString("doc.getElementById('LoginPh').value = 'plant';")
js.evalString("doc.getElementById('PasswordPh').value = 'plant';")
js.evalString("doc.getElementById('btnlogin').click();")
End Sub
Please help me.
Last edited: