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
Post a Comment