I get an error message when trying to use the InvokeScript method in Edge. It works in all other browsers but Edge. Am I missing a browser setting somewhere? I can open the development tools in Edge and run the same javascript in the console that I am passing to the InvokeScript method and it works fine.
6 Answers, 1 is accepted
0
Hi Jeff,
I've tried some simple code like this:
and worked fine. Can you please share your code so we can test/debug it locally?
Regards,
Nikolai
Progress Telerik
I've tried some simple code like this:
this.Log.WriteLine(this.ActiveBrowser.Actions.InvokeScript("location.href"));
and worked fine. Can you please share your code so we can test/debug it locally?
Regards,
Nikolai
Progress Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Jeff
Top achievements
Rank 1
answered on 26 May 2017, 05:00 PM
Here is some of the code that is failing when using the InvokeScript method. cw is my ActiveBrowser. This code works on all browsers except Edge.
public void Actual_Finish(string date)
{
cw.Actions.InvokeScript("$('#ctl00_Main_calActualFinishDate').val(new Date('" + date + "'))");
}
0
Jeff
Top achievements
Rank 1
answered on 26 May 2017, 06:52 PM
This is the error I am seeing.
"An exception of type 'ArtOfTest.WebAii.Exceptions.ExecuteCommandException' occurred in ArtOfTest.WebAii.dll but was not handled in user code"
0
Hello Jeff,
Since you are relying on jQuery you will need more time so that the Edge engine can properly load all dependencies, I've tried this against the Kendo jQuery demos and everything worked fine:
Regards,
Nikolai
Progress Telerik
Since you are relying on jQuery you will need more time so that the Edge engine can properly load all dependencies, I've tried this against the Kendo jQuery demos and everything worked fine:
this
.ActiveBrowser.NavigateTo(
"http://demos.telerik.com/kendo-ui/dateinput/index"
);
System.Threading.Thread.Sleep(5000);
this
.ActiveBrowser.Actions.InvokeScript(
"$(\"#dateinput\").val(\"5.5.2017\");"
);
System.Threading.Thread.Sleep(5000);
Regards,
Nikolai
Progress Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings
0
Jeff
Top achievements
Rank 1
answered on 06 Jun 2017, 06:27 PM
It still does not work.
0
Hi Jeff,
It seems then that the problem is an application specific one. Could you provide a sample app that reproduce the problem to investigate it, please?
Kind Regards,
Nikolay Petrov
Progress Telerik
It seems then that the problem is an application specific one. Could you provide a sample app that reproduce the problem to investigate it, please?
Kind Regards,
Nikolay Petrov
Progress Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings