Results 1 to 2 of 2

Thread: [RESOLVED] Please help me - My app is making click in the wrong link.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2011
    Posts
    294

    Resolved [RESOLVED] Please help me - My app is making click in the wrong link.

    Ok I am using this code :

    Code:
    Dim element As HtmlElement = wbForumpm.Document.GetElementsByTagName("a").Cast(Of HtmlElement).Where(Function(el) el.GetAttribute("rel") = "nofollow").Last
            If element IsNot Nothing Then element.InvokeMember("click")

    In the same page there are severals link with sames elements for example:

    1-<a accesskey="2" href="http://www.cristovideos.com/search.php?do=getnew" rel="nofollow">New Page</a>

    2-<a rel="nofollow" href="http://www.cristovideos.com/musica.php?do=newmusic&u=60758">publicar cancion</a>


    3-<a href="http://www.adoretube.com" rel="nofollow">adoretube</a>

    Now if I use at the end .Firstordefault the app make click on number one . and If I use .last the app make click on number 3 .

    I need to make click in the number 2. Please help me.

  2. #2
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: Please help me - My app is making click in the wrong link.

    Code:
    .ToArray()(1)
    instead I suppose. There's probably a method, but that's sufficient.

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