Playback doesn’t work on Windows XP with IE8, Explorer stays at “about:blank” till the timeout

5 posts, 0 answers
  1. Junping
    Junping avatar
    7 posts
    Member since:
    Sep 2011

    Posted 14 Sep 2011 Link to this post

    We want to automate some tests against our Silverlight application. Trying out the „Test Studio“, I managed to record a Login action, but the recoded Steps just don’t get replayed. At playback, the IE starts up and then stays at “about:blank“ till the timeout.  In the log file, I saw the following error messages:

     

    Overall Result: Fail
    ------------------------------------------------------------
    '14.09.2011 20:23:06' - Starting execution....
    '14.09.2011 20:23:06' - Detected a Silverlight Test. Setting EnableSilverlight=True
    ------------------------------------------------------------
    '14.09.2011 20:23:42' - 'Fail' : 1. Click LoginButton
    ------------------------------------------------------------
    Failure Information:
    ~~~~~~~~~~~~~~~
    Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Unable to find the Silverlight plugin on the following page:'about:blank' using the following expression:'[id 'Exact' silverlightControlHost] AND [tagname 'Exact' div][tagname 'Exact' object]'. Exception: System.TimeoutException: Wait for condition has timed out  
    at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)  
    at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)  
    at ArtOfTest.WebAii.Synchronization.Wait.ForCondition(Func`3 condition, Boolean invertCondition, Object custom, Int32 timeout)  
    at ArtOfTest.WebAii.Synchronization.Wait.ForExists(Int32 timeout, Boolean refreshElement)  
    at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.GetHost(IAutomationHost topBrowser, ElementDescriptor element, Int32 hostFindTimeout, Int32 appConnectTimeout, Boolean cachedSLAppOnly, String& error)

     

    I read some other threads of the similar problem; the suggested solution would be to, turn-off the IE’s “Protected Mode“ using the checkbox on the Security tab of IE. Unfortunately, my PC is running with Windows XP and IE8., there is no such checkbox for IE8 on Windows XP.  Protected Mode is only available on Windows Vista because it is based on security features new to Windows Vista.   

    I can’t upgrade my PC to Vista. So I wonder if there is other way to overcome this problem. Any idea would be appreciated.  

     

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 14 Sep 2011 Link to this post

    Hi Junping,

    It looks like for some unknown reason you're missing the NavigateTo step. Step 1 should always be a NavigateTo that opens your web application. But I can see in the log that step 1 is "Click LoginButton". Since the browser did not navigate to your web application, of course the login button won't be there to click on it. Just record a NavigateTo test step and make sure you move it to step 1.

    Usually the first page is a login form, so I am used to seeing step 2 - Set Text UserID, step 3, Set Text Password, step 4 - click Login. But that might not be the case for your web application. If "Click LoginButton" brings up the login dialog, then that would be normal for step 2.

    Greetings,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Junping
    Junping avatar
    7 posts
    Member since:
    Sep 2011

    Posted 15 Sep 2011 Link to this post

    Hi Cody, Thanks for the answer. It's true, for some reason there is missing the step "Navigate to" in my recorded action. But, I watched your DEMO "http://www.telerik.com/automated-testing-tools/support/videos/getting-started/get-to-know-test-studio---july-2011.aspx" again; looks like your Case Study for silverlight application behave the same as mine. Please pay attention to the Demo at the time of 00:42:29/00:53:28, there is missing the step "Navigate to" as well (see attached snapshot-1). Interesting thing is: after the first Playback, the step "Navigate to" is suddenly added at the top of all steps (see attached snapshot-2). How does this happen? Another question, is there any chance to manually add a step in the recorded actions?



         
  4. Junping
    Junping avatar
    7 posts
    Member since:
    Sep 2011

    Posted 15 Sep 2011 Link to this post

    I found a work-around: by adding this line of code in the class "ActiveBrowser.NavigateTo("your start page")", playback start to work.    
  5. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 15 Sep 2011 Link to this post

    Hello Junping,

    I do see what you're referring to. That was a minor glitch in the video (and was embarrassing when Dan Levy was presenting it to his live audience). if you look really close you'll notice that the video was edited after it was recorded and the corrected test was used containing the required NavigateTo step. This can be seen when the test completes at 00:42:40, which you correctly pointed out as "the step "Navigate to" is suddenly added at the top of all steps".

    A little later on in the video, at time 00:43:24 and :25, you can see how a NavigateTo step is recorded. Though I admit it's not as obvious because you can only see a test step being added behind the browser window, not the entire test step.

    You always have the ability to record new test steps (including the NavigateTo step) into an existing test. This is what I would do in your case. The coded step does work, but we always advise our customers to avoid code whenever possible. Generally the test runs more reliably and is easier to maintain when you don't have code to deal with (or at least minimize the amount of code).

    To do this, open the test, click Record at the top then record the steps you need. A NavigateTo is recorded by amply entering a URL into the browsers address bar and hitting the Enter key. New test steps are added to the bottom of the test by default. You have the option of right clicking on any test step and selecting "Record Next Step -> After / Before" to change the recording position.

    Hope that clarifies what's going on and helps you modify and maintain your tests!

    Regards,
    Cody
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top