Detecting the value of an element on a web page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    Detecting the value of an element on a web page

    Apologies if this is not clear, I'm not 100% sure how to ask the question to start with.

    On a web page there is a line that reads:

    Code:
    <div id="attack_alert" style="visibility:hidden;">
    Now, if I open the web page up in web browser within my vb.net application.

    How do I then detect whether the "attack_ale rt" is:
    Code:
    1, <div id="attack_alert" style="visibility:visible;">
    OR
    Code:
    2, <div id="attack_alert" style="visibility:hidden;">
    Thanks James
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    #2
    Solved this myself in the end.

    For future users: the solution:

    Code:
     Dim myElement As HtmlElement
            myElement = webbrs.Document.GetElementById("attack_alert")
            Dim value2 As String = myElement.Style

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      error double post

      please delete

      Comment

      Working...