looking for the equivalent of the webbrowser namespaces/functions/properties/events in awesomium :
.Document
.DocumentText (for use with webbrowser.documenttext.contains("string") )
.GetElementById("ElementID as String).InnerText
.GetElementById("ElementID as String").InvokeMember("click")
.Document.Forms
for example:
..Code:If DidMarketLogin = False Or DidSearchLogin = False Then If MarketSearchList.Document IsNot Nothing Then If MarketSearchList.DocumentText.Contains("LOGIN EXPIRED") Then DidMarketLogin = True MarketSearchList.Document.GetElementById("username").InnerText = LoginForm.LoginText.Text 'This will type in the login text") MarketSearchList.Document.GetElementById("password").InnerText = LoginForm.PasswordText.Text MarketSearchList.Document.GetElementById("free").InvokeMember("click") Else DidMarketLogin = True End If End If End If
i also need the proper way to handle when navigating is triggered.
eg:
WebBrowser1.Navigating
such as:
any information, or links to the relevant docs, would be appreciated.Code:Private Sub MarketSearchList_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating If InStr(LCase(e.Url.ToString()), "go:") Then 'here i cancel the event and let my app use the information from the link e.Cancel = True ProcessSounds(" AYE ") MakeGo(e.Url.ToString()) Exit Sub End If If InStr(e.Url.ToString(), "waxystudios.com") = 0 Then ' I'm trying here to cancel the event so that the WebBrowser1 ' control doesn't go there. ' instead i let their default browser navigate to the site. e.Cancel = True ProcessSounds(" AYE ") System.Diagnostics.Process.Start(getDefaultBrowser(), e.Url.ToString()) Else 'let the webcontrol navigate. don't interrupt it. e.Cancel = False End IF End Sub




Reply With Quote