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

Automation running failed_Unable to find the Silverlight plugin

1 Answer 61 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cherry
Top achievements
Rank 1
Cherry asked on 16 Jun 2011, 07:58 AM

Hello,

When i run the automation case with vs2010, it failed and  threw the exception as below, which sees that there need the silverlight plugin installed. But i am not sure which plugin i should install. Currently in my machine there have the silverlight3 SDK AND
silverlight4 SDK installed.

Overall Result: Fail
------------------------------------------------------------
'6/16/2011 2:27:13 PM' - Detected custom code in test. Locating test assembly: UIAutomation.dll.
'6/16/2011 2:27:13 PM' - Assembly Found: C:\Redstone\RedstoneDev\Clients\Test\UITests\UIAutomation\TestResults\v-ccheng_MSNBC-CCHENG01 2011-06-16 14_27_10\Out\UIAutomation.dll
'6/16/2011 2:27:13 PM' - Loading code class: 'UIAutomation.RedstoneTests.HelperSteps.Select_Env_Launch_Redstone'.
------------------------------------------------------------
'6/16/2011 2:27:14 PM' - 'Pass' : 1. [Select_Env_Launch_Redstone_CodedStep] : @"Navigate to : 'Test Redstone URL'
'6/16/2011 2:27:44 PM' - 'Fail' : 2. LeftClick on Item24Border
------------------------------------------------------------
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:'res://ieframe.dll/http_404.htm#http://msnbc-kayu01.fareast.corp.microsoft.com/wbstart.htm?DisableConfirmPrompt=true' 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)
InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Unable to find the Silverlight plugin on the following page:'res://ieframe.dll/http_404.htm#http://msnbc-kayu01.fareast.corp.microsoft.com/wbstart.htm?DisableConfirmPrompt=true' 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)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Overall Result: Fail
'6/16/2011 2:27:44 PM' - Duration: [0 min: 30 sec: 689 msec]
------------------------------------------------------------

<<< Test-as-Step 'RedstoneTests\HelperSteps\Select_Env_Launch_Redstone.aii' log ends.

InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Unable to find the Silverlight plugin on the following page:'res://ieframe.dll/http_404.htm#http://msnbc-kayu01.fareast.corp.microsoft.com/wbstart.htm?DisableConfirmPrompt=true' 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)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Overall Result: Fail
'6/16/2011 2:27:44 PM' - Duration: [0 min: 30 sec: 923 msec]
------------------------------------------------------------

<<< Test-as-Step 'Applets\CommonSteps\Open_test_story.aii' log ends.

InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Unable to find the Silverlight plugin on the following page:'res://ieframe.dll/http_404.htm#http://msnbc-kayu01.fareast.corp.microsoft.com/wbstart.htm?DisableConfirmPrompt=true' 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)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/16/2011 2:27:44 PM' - Overall Result: Fail
'6/16/2011 2:27:44 PM' - Duration: [0 min: 31 sec: 735 msec]
------------------------------------------------------------
'6/16/2011 2:27:45 PM' - Test completed!

Best,
Cherry

1 Answer, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 22 Jun 2011, 02:44 PM
Hi Cherry,
     this issue is not related to the version of Silverlight you're using.

Try adding a WaitForExists step on a Silverlight element before the LeftClick step (screenshot 1).
This will assure that the Silverlight application is properly loaded. You can increase the timeout on this step (10 seconds by default).

Also try increasing the Silverlight connection timeout (screenshot 2).

Do you still get the same issue?

Regards,
Stoich
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
Tags
General Discussions
Asked by
Cherry
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Share this question
or