Android Question Question about webview

padvou

Active Member
Licensed User
Longtime User
Could someone please explain to me how to make the equivalent code in B4A?
B4X:
 Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
                Dim theElementCollection2 As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
                For Each curElement As HtmlElement In theElementCollection
                    Dim controlName As String = curElement.GetAttribute("name").ToString
                    If controlName = "username" Then
                        curElement.SetAttribute("Value", userName)
                    End If
                Next

                theElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
                For Each curElement As HtmlElement In theElementCollection
                    Dim controlName As String = curElement.GetAttribute("name").ToString
                    If controlName = "password" Then
                               
                        curElement.SetAttribute("Value", passWord)
                    End If
                Next
                For Each curElement As HtmlElement In theElementCollection2
                    Dim controlName As String = curElement.GetAttribute("outerhtml").ToString
                    If controlName.Contains("/umwebmail/images/corporate/el/form_confirm.gif") = True Then
                        curElement.InvokeMember("onclick")
                        Exit For
                    End If
                Next
 
Top