Iterate Form Fields in WatiN -


is there way iterate form field in watin? code snippet highly appreciated. thanks.

string url = "http://localhost//test.htm"; string formid = "myformid";   ie ie = new ie(url); form form = ie.form(formid);              checkboxcollection checkboxcollection = form.checkboxes; (int index = 0, total = checkboxcollection.count; index < total; index++) {     checkbox checkbox = checkboxcollection[index];     this.addinputcontrol(checkbox.id, checkbox); }  radiobuttoncollection radiobuttoncollection = form.radiobuttons; (int index = 0, total = radiobuttoncollection.count; index < total; index++) {     radiobutton radiobutton = radiobuttoncollection[index];     this.addinputcontrol(radiobutton.id, radiobutton); }  selectlistcollection selectlistcollection = form.selectlists; (int index = 0, total = selectlistcollection.count; index < total; index++) {     selectlist selectlist = selectlistcollection[index];     this.addinputcontrol(selectlist.id, selectlist); }  textfieldcollection textfieldcollection = form.textfields; (int index = 0, total = textfieldcollection.count; index < total; index++) {     textfield textfield = textfieldcollection[index];     this.addinputcontrol(textfield.id, textfield); } 

Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -