Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27230

VS 2010 How to avoid or close automatically this popup in Internet Explorer? - Please help

$
0
0
This is the popup , I am using external webbrowser, the imagen bellow is a sample from the web but is the same popup

Attachment 94493


Code:

Private Sub PostTo (ByVal src As String)
        _browser.GoTo(src)

        Dim div = _browser.Divs.Where(Function(element) element.ClassName = "uiTypeahead composerTypeahead mentionsTypeahead").FirstOrDefault()

        While Not div.Exists
            Thread.Sleep(1000)
            div = _browser.Divs.Where(Function(element) element.ClassName = "uiTypeahead composerTypeahead mentionsTypeahead").FirstOrDefault()
        End While

        _browser.RunScript("Bootloader.loadComponents([""control-textarea""], function() { TextAreaControl.getInstance(this) }.bind(this)); ")

        For Each textField As TextField In div.TextFields
            Dim attr = textField.GetAttributeValue("aria-expanded")
            If String.IsNullOrEmpty(attr) Then
                Continue For
            End If
            textField.SetAttributeValue("aria-expanded", True)
            textField.TypeText(" ")
        Next

        If slowCheckBox.Checked Then
            If div.TextFields.Any(Function(element) element.Name = "xhpc_message_text") Then
                div.TextField(Find.ByName("xhpc_message_text")).TypeText(postTextBox.Text)
            End If
        Else
            If div.TextFields.Any(Function(element) element.Name = "xhpc_message_text") Then
                div.TextField(Find.ByName("xhpc_message_text")).SetAttributeValue("InnerText", postTextBox.Text)
            End If
        End If

        Dim form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
        form.Submit()

        If Not String.IsNullOrEmpty(My.MySettings.Default.CaptchaId) Then
            If _browser.TextFields.Any(Function(element) element.Name = "recaptcha_response_field") Then
                Dim captcha As String = Nothing
                SuperToolfacebook.GetCaptcha(_browser, "http://www.google.com/recaptcha/api/image?c", captcha,
                                              My.MySettings.Default.CaptchaId, My.MySettings.Default.CaptchaPass)

               
                _browser.TextField(Find.ByName("recaptcha_response_field")).SetAttributeValue("InnerText", captcha)
                form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
                form.Submit()
            ElseIf _browser.TextFields.Any(Function(element) element.Id = "captcha_response") Then
                Dim captcha As String = Nothing
                SuperToolfacebook.GetCaptcha(_browser, "http://www.google.com/recaptcha/api/image?c", captcha,
                                              My.MySettings.Default.CaptchaId, My.MySettings.Default.CaptchaPass)

                _browser.TextField(Find.ById("captcha_response")).SetAttributeValue("InnerText", captcha)
                form = _browser.Forms.Where(Function(element) element.GetAttributeValue("action").Contains("/ajax/updatestatus.php")).FirstOrDefault()
                form.Submit()
            End If
        End If

Attached Images
 

Viewing all articles
Browse latest Browse all 27230

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>