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

Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame

5 Answers 224 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Susmita
Top achievements
Rank 1
Susmita asked on 10 Jun 2014, 06:37 AM
Hi
    I m using telerik test studio 2013.2.When I recorded a page in my project there was dropdown which when clicked navigated to a login page.while recording everything works fine it was able to login to the new page but when executed the test fails when it comes to the login page
the log message is :
Overall Result: Fail
------------------------------------------------------------
'6/10/2014 2:30:02 AM' - Using .Net Runtime version: '4.0.30319.18052' for test execution. Build version is '2013.2.1327.0'.
'6/10/2014 2:30:02 AM' - Starting execution....
'6/10/2014 2:30:02 AM' - Detected a Silverlight Test. Setting EnableSilverlight=True
------------------------------------------------------------
------------------------------------------------------------
'6/10/2014 2:30:05 AM' - Enabling Html Popup Tracker. Test expecting Popups.
'6/10/2014 2:30:05 AM' - Using 'InternetExplorer' version '9.0' as default browser. 
'6/10/2014 2:30:31 AM' - 'Pass' : 1. Execute test 'Login in fuelnet with pmartin'

>>> Test-as-Step 'Fuelnet()\Login in fuelnet with pmartin.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'6/10/2014 2:30:06 AM' - Enabling Html Popup Tracker. Test expecting Popups.
'6/10/2014 2:30:06 AM' - Using 'InternetExplorer' version '9.0' as default browser. 
'6/10/2014 2:30:07 AM' - 'Pass' : 1. Navigate to : 'https://fuelnetsp.stg.mansfieldoil.com'
'6/10/2014 2:30:08 AM' - 'Pass' : 2. Enter text 'pmartin' in 'UserNameText'
'6/10/2014 2:30:09 AM' - 'Pass' : 3. Keyboard (KeyPress) - Capital (1 times) on 'PasswordPassword'
'6/10/2014 2:30:09 AM' - 'Pass' : 4. Enter text 'FSSA' in 'PasswordPassword'
'6/10/2014 2:30:09 AM' - 'Pass' : 5. Keyboard (KeyPress) - Capital (1 times) on 'PasswordPassword'
'6/10/2014 2:30:09 AM' - 'Pass' : 6. Enter text 'FSSAdmin' in 'PasswordPassword'
'6/10/2014 2:30:31 AM' - 'Pass' : 7. Click 'BtnLoginSubmit'
'6/10/2014 2:30:31 AM' - 'NotRun' : 8. Verify image of 'MansfieldImage'. Allow 1% error tolerance.
------------------------------------------------------------
'6/10/2014 2:30:31 AM' - Overall Result: Pass
'6/10/2014 2:30:31 AM' - Duration: [0 min: 24 sec: 764 msec]
------------------------------------------------------------

<<< Test-as-Step 'Fuelnet()\Login in fuelnet with pmartin.tstest' log ends.

'6/10/2014 2:30:35 AM' - 'Pass' : 2. Click 'SiteConsoleSpan'
'6/10/2014 2:30:55 AM' - 'Pass' : 3. Wait for '20000' msec.
'6/10/2014 2:31:56 AM' - 'Fail' : 4. Enter text 'pmartin' in 'CphMainTxtUserNameText'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=~fitFrameId_29603093,name=Frame_0,src=http://fuelnet.stg.mansfieldoil.com/,UseQuery:False]' timed out. Error: Wait for condition has timed out
InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=~fitFrameId_29603093,name=Frame_0,src=http://fuelnet.stg.mansfieldoil.com/,UseQuery:False]' timed out. Error: Wait for condition has timed out
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'6/10/2014 2:31:56 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/10/2014 2:31:56 AM' - Overall Result: Fail
'6/10/2014 2:31:56 AM' - Duration: [1 min: 51 sec: 528 msec]
------------------------------------------------------------
'6/10/2014 2:32:00 AM' - Test completed!








5 Answers, 1 is accepted

Sort by
0
Susmita
Top achievements
Rank 1
answered on 10 Jun 2014, 06:42 AM
I have even tried using the ( ~ ) infront of the fame id ,name n also I have enable silverlight option in properties but still I get failed step with the above log message.Please help me as I need the solution without any coding(I have no idea about coding )because of it I am unable to do proceed further
0
Susmita
Top achievements
Rank 1
answered on 10 Jun 2014, 10:56 AM
its a share point application
0
Cody
Telerik team
answered on 12 Jun 2014, 10:16 PM
Hello Susmita,

I don't believe this requires any coding. We just need to figure out what's actually there compared to what the test is looking for. We can see the test is looking for an <iframe> element having the properties:

Frame:id=~fitFrameId_29603093,name=Frame_0,src=http://fuelnet.stg.mansfieldoil.com/

What we don't know is what was actually there when the test executed. Enabling Silverlight won't help in this case because Silverlight is not involved in your test.

To further diagnose this, please go to Step Failure Details, find and click Export and send me the generated .zip file. It will contain a snapshot of the DOM. Once I have that I will be able to see what was actually there at the point of failure and be able to help figure out the right parameters for locating the frame.

If I were to guess, I would say that most like the frame ID change. Noting that there's a number in the ID "fitFrameId_29603093" it's common for this ID to be dynamically generated every time the application runs, and it's getting a different number. If the numbers don't match Test Studio can't find the old one.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Accepted
Miguel
Top achievements
Rank 1
answered on 13 Jun 2014, 04:24 PM
Hi Susmita,

In most of my tests I've found that this kind of frames have a variable identifier which could be your case. Try removing _29603093 as this might be different every time you open the frame, just use "id=~fiFrameID".
0
Susmita
Top achievements
Rank 1
answered on 19 Jun 2014, 06:40 AM
Thank you for the solution...it helped me
Tags
General Discussions
Asked by
Susmita
Top achievements
Rank 1
Answers by
Susmita
Top achievements
Rank 1
Cody
Telerik team
Miguel
Top achievements
Rank 1
Share this question
or