Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to click on a link ?

How to click on a link ?

Scheduled Pinned Locked Moved Visual Basic
questioncsharphelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SekharOne
    wrote on last edited by
    #1

    Hi All I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link. I have written the code as bellow : Dim link1 As mshtml.HTMLLinkElement link1 = WebBrowser1.Document.Links(10) Now How can I click the link link1 to navigate to the link. Please Help. Thanks in advance.

    Sekhar :)

    N 1 Reply Last reply
    0
    • S SekharOne

      Hi All I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link. I have written the code as bellow : Dim link1 As mshtml.HTMLLinkElement link1 = WebBrowser1.Document.Links(10) Now How can I click the link link1 to navigate to the link. Please Help. Thanks in advance.

      Sekhar :)

      N Offline
      N Offline
      Nilesh Hapse
      wrote on last edited by
      #2

      Did you try using WebBrowser1.Navigate ?

      "Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup

      S 1 Reply Last reply
      0
      • N Nilesh Hapse

        Did you try using WebBrowser1.Navigate ?

        "Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup

        S Offline
        S Offline
        SekharOne
        wrote on last edited by
        #3

        Hi Nilesh I had already used that before I get this problem. I am able to navigate to url addresses using WebBrowser1.Url = New System.Uri(txtURL.Text) and after navigating to the site in the txtURL i found there are several links and several buttons. I want to know how I can click on a link or a button on the page so that I can actually simulate the process of someone sitting and clicking on the links. Thanks for your response. If anybody can help me out in finding a solution to this problem then it will help me a lot. Thanks in advance.

        Sekhar :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups