c# - How to click on all elements with the same class/parametr WatiN -


i using watin dll, have table , in each td have link <a> href =javascript:void(0) </a> ,i case have same href in of them(they dont have class),i need click on them (they open new tr data) ,and save html page,my problem click on of them , can click on first 1 this

  frame framebody = browser.frame(find.byname("body"));   framebody.link(find.by("href", "javascript:void(0)")).click(); 

but need click on links have "href", "javascript:void(0)",i think need use listcollection new in watin , still cant find way this.

any ideas how click on links "href", "javascript:void(0)".

you can links inside of frame body below.

frame framebody = browser.frame(find.byname("body")); linkcollection links = framebody.link;  foreach(link link in links) {   if(link.getattributevalue("href").contains("javascript:void(0)"))   {     link.click();      // todo - add logic here saving file.           } } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -