javascript - browser.Eval() throwing Exception -


i want enter text in textfield using c# watin. using following statement same

browser.eval(string.format("$('#{0}').val('design')","searchquery")); 

but giving me following exception:

referenceerror: $ not defined in browser.eval()

if not have jquery added part of application, can go traditional java script.

string query = "var e=document.getelementbyid('{0}');e.value='{1}'"; browser.eval(string.format(query, "searchquery", "design")); 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -