Rank: Newbie Groups: Member
Joined: 4/27/2015 Posts: 6
|
Hi, in some cases
Code: C#
Element.InvokeFunction("setAttribute",new object[]{"value","someValue"})
is not working, empty field still remains. I found only one solution to set the value anyway but I need to call JQuery script, in such a way:
Code: C#
webView.EvalScript("$('input').val('someValue').trigger('change');")
Do you have any idea how to call above script in InvokeFunction function ? I would be grateful.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,273
|
Hi,
You can't convert any EvalScript into InvokeFunction. InvokeFunction calls a JavaScript function, where EvalScript evaluate any JavaScript code. So there is no fixed way to convert one to another. If a specific JavaScript code is working or not working, you can try to debug them in a regular web browser to see if you can find out the root cause. We won't debug or advice you on JavaScript since it's a general Web programming topic.
Thanks!
|