1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Button Click Using Gecko Fx

Discussion in 'Visual Basic .NET' started by genious1, Dec 7, 2015.

  1. genious1

    genious1 Newbie

    Joined:
    Apr 7, 2013
    Messages:
    1
    Likes Received:
    0
    hello, i am using geckofx in vb and i wannt to click a button on a website {<a class="text1 text1" href="javascript:void(0);" multilinks-noscroll="true">text2 text2</a>}, how can i do this ?
    thanks!
     
  2. Netro

    Netro Junior Member

    Joined:
    Jun 12, 2015
    Messages:
    107
    Likes Received:
    27
    Occupation:
    Baka Dev.
    Hopefully this help OP.

    Code:
    Dim node As GeckoNode = geckoWebBrowser.Document.GetElementsByClassName("text1 text1")(0).FirstChild
    If NodeType.Element = node.NodeType Then
        Dim element As GeckoElement = DirectCast(node, GeckoElement)
        element.Click()
    Else
         Msgbox("No element found.")
    End If
    
     
    Last edited: May 1, 2016