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

python 3 IndexError: list index out of range -

android - How to save instance state of selected radiobutton on menu -

IF statement in MySQL trigger -