Results 1 to 2 of 2

Thread: :D Click all elements in webbrowser besides 1

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2013
    Posts
    40

    :D Click all elements in webbrowser besides 1

    If I wanted to use a code like...

    Code:
    Dim tag As HtmlElement
             For Each tag In WebBrowser1.Document.All
                 tag.InvokeMember("click")
             Next
    ...but I wanted to exclude one element (button) with a name of "bt1", how would I do this?
    Thank you all.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: :D Click all elements in webbrowser besides 1

    have a look at the Enumerable.Except Method :

    http://msdn.microsoft.com/en-us/libr...(v=vs.90).aspx

    alternatively you could test if tag.getattribute("name") = "bt1", before clicking on tag

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