Results 1 to 4 of 4

Thread: Vb.net document.getelementbyid() not working with chromium

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2019
    Posts
    37

    Vb.net document.getelementbyid() not working with chromium

    The new code I tried didn't seem to work so I'm looking for guidance on how my VB code setup for an IE browser can be converted to work in Chromium:

    Code:
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Value.Text = Value.Text - 1
    
        If Value.Text = 0 And
            WebBrowser1.DocumentText.Contains(User.Text) Then
    
            WebBrowser1.Document.GetElementById("msg").InnerText = R1.Text
           WebBrowser1.Document.GetElementById("submit").InvokeMember("Click")
            Value.Text = 240
            LatestActivity.Text = (DateTime.Now.ToString())
    
        End If
    End Sub
    The new code I've started with is simply:

    Code:
    browser.ExecuteScriptAsync("document.GetElementById('message').InnerText;" = R1.Text)
    But I unfortunately had no luck with it so any guidance is greatly appreciated.
    Last edited by nitrozity; Sep 10th, 2022 at 07:10 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width