Right I don't like asking but I really cant find this anywhere and know the answer will be simple but I just cant get my head around it
Say you have a web page with 50 images with the same id,alt,classname etc the same and I wanted to click the 4th how would i go about doing this?
I was thinking looping through each one until the loop count reaches 4 but I cant seen to get it working
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
for i = 0 to pageelements.count
if i = 4 then pageelement.invokemember("click")
next i
the above code is completely wrong but this was the closest i was getting
Thanks in advance
Say you have a web page with 50 images with the same id,alt,classname etc the same and I wanted to click the 4th how would i go about doing this?
I was thinking looping through each one until the loop count reaches 4 but I cant seen to get it working
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
for i = 0 to pageelements.count
if i = 4 then pageelement.invokemember("click")
next i
the above code is completely wrong but this was the closest i was getting
Thanks in advance