Сan run the tests in headless web browsers.

3 posts, 0 answers
  1. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

    Posted 09 Sep 2014 Link to this post

    Hello, I'm wondering whether it is possible to write tests for my web silverlight application using headless web browsers and telerik test framework.
    1) I know that telerik test framework is BrowserType.AspNetHost but I am unsure whether it is possible in this mode to test the silverlight application?
    2) And I do not quite understand why you need to specify the path to the source code 'settings.WebAppPhysicalPath = @ "D:\...\Web"; '?
    3) Also, I have seen SilverlightApplicationPath but I can not understand in what cases it is applied?
    4) My test application written in Asp.net MVC and it is tightly associated with silverlight, using BrowserType.InternetExplorerr can achieve the desired but will it all work correctly in BrowserType.AspNetHost, I did not get because in the first case, we specify a full url and secondly the relative path to the project, or am I doing something wrong? And if the tests will be run on a separate server and will not have access to the project files?

    Thanks in advance.
  2. Cody
    Cody avatar
    3354 posts

    Posted 12 Sep 2014 Link to this post

    Hello Vitaliy,

    The very short and quick answer is no you cannot use BrowserType.AspNetHost to test your Silverlight application. Net let me try to explain why:

    The AspNetHost is a special headless feature that comes with Visual Studio and can only be used to test an HTML based application which does not depend on JavaScript or Silverlight. This AspNetHost does not include a JavasScript run time engine nor a Silverlight run time engine.

    Even if it did, to automate a Silverlight application requires use of the mouse and keyboard. If there's no UI, you cannot click on buttons (links, dropdowns, etc.) or enter text into input fields.

    I'm sorry but I don't believe it's possible to test a Silverlight application headless. A visible fully interactactive UI is required.

    For the other questions you asked:

    Item 1) Answered above

    Item 2) The path is required by the Visual Studio AspNetHost component. It will go to this path and load the application from that path into it's headless component.

    Item 3) The SilverlightApplicationPath is only used when testing a Silverlight Out Of Browser application, one that has been installed on the machine and doesn't use the browser to run.

    Item 4) Hopefully the reason this doesn't work is explained above already.

    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Vitaliy
    Vitaliy avatar
    20 posts
    Member since:
    Jul 2012

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

    Hi Cody,

    Thank you very much.
Back to Top