In-memory browser?

11 posts, 0 answers
  1. Scott
    Scott avatar
    3 posts
    Member since:
    Jan 2012

    Posted 18 Jan 2012 Link to this post

    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
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Jan 2012 Link to this post

    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.
  3. Scott
    Scott avatar
    3 posts
    Member since:
    Jan 2012

    Posted 18 Jan 2012 Link to this post

    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.
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 18 Jan 2012 Link to this post

    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.
  5. Scott
    Scott avatar
    3 posts
    Member since:
    Jan 2012

    Posted 18 Jan 2012 Link to this post

    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.
  6. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

    Posted 10 Sep 2014 Link to this post

    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?
  7. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 11 Sep 2014 Link to this post

    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
     
  8. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

    Posted 12 Sep 2014 in reply to Cody Link to this post

    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.
  9. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

    Posted 12 Sep 2014 in reply to Cody Link to this post

    ... 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.
  10. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

    Posted 15 Sep 2014 in reply to Vitaliy Link to this post

    ASP.NET host server and Silverlight.
    Maybe someone would be interested to here this answer.
  11. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Sep 2014 Link to this post

    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
     
Back to Top