This is a migrated thread and some comments may be shown as answers.

In-memory browser?

10 Answers 270 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 18 Jan 2012, 06:03 AM
It appears that the testing framework is automating a browser that is installed on the system. For example, if I try to launch a Chrome browser, but Chrome is not installed, I get an error.

Is there an in-memory browser of any kind? I don't care if it's IE, Chrome, FireFox, or something else. I don't want to rely on a "properly" configured browser installed on the machine in order for things to work. I am also concerned about cookie sharing among concurrent browser windows (the default for IE 8 & 9).

I am aware that these issues can be addressed using specific browser configurations and registry hacks, but again, I don't really want to have to rely on browser configuration settings for things to work properly.

I'm looking for something akin to what HtmlUnit provides for the Java community, but I absolutely love the Test Studio interface for creating tests.

Thanks!
Scott

10 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 18 Jan 2012, 11:33 PM
Hi,

Normally Test Studio tests cannot support this. However you posted in the free Telerik Testing Framework forum, and as a coded unit test, you have the option of trying the Asp.Net In-Process Host Server

Kind regards,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 1
answered on 18 Jan 2012, 11:55 PM
Thanks for the quick reply. However, we definitely require javascript support.

"tests that require heavy client javascript execution might not be suited for this browser since there is no javascript engine running."

Thanks anyway.
0
Cody
Telerik team
answered on 19 Jan 2012, 12:16 AM
Hi,

You are correct, the ASP.NET host server does not include a JavaScript engine. The only way I know of getting JavaScript support is to execute tests in a real browser. i am sorry but I see no other possible solution for you.

Greetings,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Scott
Top achievements
Rank 1
answered on 19 Jan 2012, 03:56 AM
For anyone else reading this, there is a port of HtmlUnit to C# (http://blog.stevensanderson.com/2010/03/30/using-htmlunit-on-net-for-headless-browser-automation/) but I found it a bit unwieldy.

The JS engines used by Chrome and Firefox (V8 and SpiderMonkey) are open source, but I don't see that anyone has taken the time to integrate them into a headless browser for .Net. I guess there just isn't enough demand at this point.
0
Vitaliy
Top achievements
Rank 1
answered on 10 Sep 2014, 07:11 AM
Hello! I wonder can that something has changed in the meantime? And it turns out that it is impossible to test SilverlightApplication it uses JS to run silverlight?
0
Cody
Telerik team
answered on 11 Sep 2014, 11:11 PM
Hi Vitaliy,

We are not aware of any changes in the ASP.NET host server. As far as we know it still does not include a JavaScript engine.

I'm not sure I understand this inquiry "And it turns out that it is impossible to test SilverlightApplication it uses JS to run silverlight?". How would you run Silverlight from JavaScript? To the best of my knowledge it is not possible to launch/activate a Silverlight application using JavaScript.

I see methods where Silverlight can call a JavaScript function and maybe vice versa... but launching a Silverlight application using JavaScript? I don't see how that's even possible. As far as I know the Silverlight application must be embedded within the hosting HTML for it to load and run.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Vitaliy
Top achievements
Rank 1
answered on 12 Sep 2014, 05:59 AM
Hi, thanks for your reply.
"How would you run Silverlight from JavaScript?" - Let's do an experiment, the browser is disabled support JS and try to load the Silverlight application, sample http://demos.telerik.com/silverlight/. And the app will not work, it can be clearly seen in the browser Chrome, FF, IE.
0
Vitaliy
Top achievements
Rank 1
answered on 12 Sep 2014, 10:46 AM
... A Silverlight project contains the Silverlight.js and CreateSilverlight.js files which initializes the Silverlight plug-in for use in HTML pages, a XAML file for the UI, and code-behind files for the application code. ...
https://en.wikipedia.org/wiki/Microsoft_Silverlight

Based from this, cannot run SilverlightApplication without JS.
0
Vitaliy
Top achievements
Rank 1
answered on 15 Sep 2014, 05:58 AM
ASP.NET host server and Silverlight.
Maybe someone would be interested to here this answer.
0
Cody
Telerik team
answered on 17 Sep 2014, 03:45 AM
Hello Vitaliy,

The information contained on WikiPedia regarding these Silverlight.js and CreateSilverlight.js files appears to be incorrect, or at best outdated. Reference the 3 attached screen shots. There is no Silverlight.js or CreateSilverlight.js file to be found anywhere.

I don't think disabling JavaScript in the browser demonstrates much as the browser probably disables the Silverlight runtime engine at the same time.

Now putting the above aside, what automation challenge are you trying to solve? Maybe there's a different approach we can take.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Scott
Top achievements
Rank 1
Answers by
Cody
Telerik team
Scott
Top achievements
Rank 1
Vitaliy
Top achievements
Rank 1
Share this question
or