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

Error: The given key was not present in the dictionary.

16 Answers 1753 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nataly
Top achievements
Rank 1
Nataly asked on 12 Aug 2010, 03:51 PM
Hello,

I have an error on my test execution.

Steps:
'8/12/2010 5:45:36 PM' - 'Pass' : 127. Wait for Exists 'LoadingPanelDiv'
'8/12/2010 5:45:37 PM' - 'Fail' : 131. Wait for element 'LoadingPanelDiv' 'is not' visible.

The error occurs time after time on step 131. Wait for element 'LoadingPanelDiv' 'is not' visible.

Failure Information:
~~~~~~~~~~~~~~~
The given key was not present in the dictionary.
InnerException:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.Common.Design.Extensibility.DescriptorValueStore.GetValue[T](String propertyName)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.VisibleVerificationDescriptor.Verify(DescriptorValueStore dataStore)
   at ArtOfTest.Common.Design.Extensibility.Descriptors.VerificationDescriptor.PerformWait(IAutomationHost host)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()

Could you please help me to fix this error?

Thanks

16 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 12 Aug 2010, 05:14 PM
Hello Nataly,

What is happening in between steps 127 and 131? Is this LoadingPanelDiv going away? In other words is it being destroyed, not just being made invisible? If it's actually being destroyed I suggest using a Wait For Not Exists step in place of your Wait For Not Visible.

I suspect what's happening is the LoadingPanelDiv is actually getting destroyed and so sometimes when step 131 runs it's trying to find it to test its visibility property but errors out because it can't find the element at all.

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
0
Saima
Top achievements
Rank 1
answered on 21 Jan 2011, 09:18 AM
Hi,

I am also facing the same problem, but this is raised when i used extract step, The test failed with error on the extract step

"The given key was not present in the dictionary'

Here is the log
Overall Result: Fail
'1/21/2011 12:34:59 PM' - 'Pass' : 1. Wait for '1000' msec.
'1/21/2011 12:35:13 PM' - 'Pass' : 2. Wait for Exists 'AnimatedCommonOuterBorderBorder'
'1/21/2011 12:35:14 PM' - 'Pass' : 3. Desktop command: LeftClick on DropDownMenuButtonRaddropdownbutton
'1/21/2011 12:35:17 PM' - 'Pass' : 4. radmenuitem: 'Add Content' click action.
'1/21/2011 12:35:17 PM' - 'NotRun' : 5. Desktop command: LeftClick on Item0Gridviewrow
'1/21/2011 12:35:17 PM' - 'NotRun' : 6. Click BtnOKRadbutton
'1/21/2011 12:35:23 PM' - 'Pass' : 7. LeftClick on PARTDropDownButtonTogglebutton
'1/21/2011 12:35:23 PM' - 'NotRun' : 8. LeftClick on Item5Grid
'1/21/2011 12:35:24 PM' - 'Pass' : 9. Wait for Exists 'Item71Border'
'1/21/2011 12:35:30 PM' - 'Pass' : 10. Wait for 'CrosstabTextblock' text Same 'Crosstab'
'1/21/2011 12:35:35 PM' - 'Pass' : 11. LeftClick on Item2Checkbox
'1/21/2011 12:35:38 PM' - 'Pass' : 12. Verify Item2Checkbox's checked state is Checked
'1/21/2011 12:35:39 PM' - 'Pass' : 13. Verify 'FilterTextblock' text Same 'Filter'
'1/21/2011 12:35:41 PM' - 'Pass' : 14. Click PARTApplyFilterButtonRadbutton
'1/21/2011 12:35:41 PM' - 'NotRun' : 15. LeftClick on PARTDropDownButtonTogglebutton
'1/21/2011 12:35:50 PM' - 'Pass' : 16. LeftClick on RegionByTextblock
'1/21/2011 12:35:51 PM' - 'Pass' : 17. Click BtnOKRadbutton
'1/21/2011 12:35:53 PM' - 'Fail' : 18. Extract 'RegionByTextblock' text into DataBindVariable $(content)
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
The given key was not present in the dictionary.
InnerException:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.PropertyVerificationDescriptor.ExtractData(SilverlightApp hostApp, DescriptorValueStore dataStore)
   at ArtOfTest.WebAii.Design.Extensibility.XamlVerificationDescriptor.ExtractData(IAutomationHost targetHost, DescriptorValueStore dataStore)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
------------------------------------------------------------
'1/21/2011 12:35:54 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'1/21/2011 12:35:54 PM' - Overall Result: Fail
'1/21/2011 12:35:54 PM' - Duration: [0 min: 55 sec: 468 msec]
------------------------------------------------------------

Please help me to resolve the issue.

Thanks,
Saima

0
Saima
Top achievements
Rank 1
answered on 25 Jan 2011, 10:30 AM
Hi,

Any update on it please? Can anyone help?

Thanks,
Saima
0
Cody
Telerik team
answered on 25 Jan 2011, 05:00 PM
Hi Nataly,

Thank you for taking the time to evaluate WebUI Test Studio! I am sorry you have run into this problem and apologize for the delay getting back to you. I spoke to my software developer who works on this feature of the product. He thinks this is most likely a bug in our software that we haven't seen before.

What we need to find and fix this bug is a local repro of the problem that we can study in our source code development environment. Is there any chance you can send us the test that produces this error and grant us access to your site?

Kind regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Madhu
Top achievements
Rank 1
answered on 07 Jun 2011, 10:33 PM
Hello support,

I'm also running into same issue:

Using QA Edition: 2011.1.511.0

'6/7/2011 4:22:31 PM' - 'Pass' : 3. Desktop command: HoverOver on ViewsNobrTag
'6/7/2011 4:22:32 PM' - 'Pass' : 4. Click 'TradeManagerNobrTag'
'6/7/2011 4:22:42 PM' - 'Pass' : 5. Wait for '9999' msec.
'6/7/2011 4:22:44 PM' - 'Fail' : 6. Wait for Exists 'DetailsTextBlockTextblock'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
The given key was not present in the dictionary.
InnerException:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.Common.Design.Extensibility.DescriptorValueStore.GetValue[T](String propertyName)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ExistsVerificationDescriptor.Verify(DescriptorValueStore dataStore)
   at ArtOfTest.Common.Design.Extensibility.Descriptors.VerificationDescriptor.PerformWait(IAutomationHost host)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
------------------------------------------------------------
'6/7/2011 4:22:44 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/7/2011 4:22:44 PM' - Overall Result: Fail
'6/7/2011 4:22:44 PM' - Duration: [0 min: 12 sec: 718 msec]
------------------------------------------------------------

Any solution please?

Thanks,
Madhu.
0
Anthony
Telerik team
answered on 10 Jun 2011, 05:03 PM
Hello Madhu,

We isolated a specific scenario that caused this message and fixed it in an older version.

If you have a new scenario that invokes the same error, please provide us the means to reproduce it locally. Can you send us a copy of the erroneous test and grant us access to your site?

Regards,
Anthony
the Telerik team
0
Madhu
Top achievements
Rank 1
answered on 10 Jun 2011, 11:56 PM
Hello Anthony,

Thanks for support.

I see same error also in new R1 SP1 (Test Studio 2011.1 609) release.

My application is intranet based, sorry, outside access is not possible! I can show you via GoToMeeting session?

'6/10/2011 4:28:40 PM' - 'Pass' : 146. Verify: DataGridCell text 'Equal' '388.89'.
'6/10/2011 4:28:40 PM' - 'Pass' : 147. Verify: DataGridCell text 'Equal' '875.00'.
'6/10/2011 4:28:42 PM' - 'Fail' : 148. Verify TradeDatePickerDatepicker's selected date is 5/16/2011
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
The given key was not present in the dictionary.
InnerException:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.PropertyVerificationDescriptor.Verify(DescriptorValueStore dataStore)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.DatePickerSelectedDateVerificationDescriptor.Verify(DescriptorValueStore dataStore)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'6/10/2011 4:28:42 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'6/10/2011 4:28:42 PM' - Overall Result: Fail
'6/10/2011 4:28:42 PM' - Duration: [3 min: 1 sec: 346 msec]
------------------------------------------------------------

Thanks,
Madhu.




0
Anthony
Telerik team
answered on 14 Jun 2011, 08:33 PM
Hello Madhu,

Thank you for the error log. Based on it I was able to find a public site with a similar DatePicker and reproduce the error. I logged a bug and you can track the PITS Issue here: Public URL.

I have awarded you 1,000 Telerik points.

Kind regards,
Anthony
the Telerik team
0
Anthony
Telerik team
answered on 21 Jun 2011, 04:26 PM
Hello Madhu,

This is fixed in our latest internal build released today, version 2011.1.621. I just tested this and no longer receive the "The given key was not present in the dictionary" error when verifying a Silverlight DatePicker's selected date. The verification passes.

All the best,
Anthony
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?
0
Madhu
Top achievements
Rank 1
answered on 21 Jun 2011, 05:03 PM
Hello Anthony,

Thanks for internal build, tested my application with new build it works fine.

Thanks,
Madhu.
0
Madhu
Top achievements
Rank 1
answered on 28 Jun 2011, 05:12 PM
Hello Anthony & Support,

I see same error on different scenario, now we are using QA Edition 2011.1.624.0 version:

I'm searching for a string in Silverlight application, if the string is not found it throws below exception: 

Failure Information: 
~~~~~~~~~~~~~~~
The given key was not present in the dictionary.
InnerException:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.SilverlightDesktopActionDescriptor.Execute(IApplication hostApp)
   at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Screenshot attached.

Thanks,
Madhu.
0
Anthony
Telerik team
answered on 29 Jun 2011, 03:52 PM
Hi Madhu,

I was unsuccessful in replicating this. Do you have an example of a test on a public site that exhibits the same behavior?
 
Since outside access to your application is not possible, perhaps you can record a Fiddler trace and send it to us along with a copy of your test. You could attach those files in .zip format to a support ticket which, unlike a forum post, is confidential.

Regards,
Anthony
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?
0
Madhu
Top achievements
Rank 1
answered on 29 Jun 2011, 05:18 PM
Hello Anthony,

Thanks for support!

Here is the sample application link (http://demos.telerik.com/silverlight/#GridView/Search).
Also, find attached project files & screenshot from above site.

Trying to search for 'Telerik' string it throws same exception.

Thanks,
Madhu.
0
Anthony
Telerik team
answered on 29 Jun 2011, 06:12 PM
Hello Madhu,

Thank you for the sample test. It really helped me understand your scenario.

I have a few questions, however. Since the search phrase "Telerik" returns no results, shouldn't we expect step 6 to fail? Is your concern that the error message is misleading?

When I recreated your sample test from scratch, I could not create the GridViewCell verification (step 6) after the search. The grid was empty and the hover over highlighting detected no GridViewCells. I had to create this verification before I performed the search, and then manually change its value to "Telerik." Is that what you did? If no GridViewCells exist when the test tries to verify a cell's text, shouldn't we expect an error?

Best wishes,
Anthony
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?
0
Madhu
Top achievements
Rank 1
answered on 29 Jun 2011, 08:05 PM
Hello Anthony,

Yes, you're right.

1st I created a search on 'Folk', wait for 'folk' exists, then clicking on cell.
after that, changed that search string to 'Telerik' and do the same thing.

I know, it should throw an error but not 'The given key was not present in the dictionary'.

I'm Expecting a error msg, unable to locate the element or item not found or Silverlight plugin cannot find.

Thanks,
Madhu.
0
Anthony
Telerik team
answered on 30 Jun 2011, 03:42 PM
Hello Madhu,

Thanks for the clarification. I agree, the current message is misleading. I filed a bug for this and you can track the PITS Issue here: Public URL.

Greetings,
Anthony
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
Nataly
Top achievements
Rank 1
Answers by
Cody
Telerik team
Saima
Top achievements
Rank 1
Madhu
Top achievements
Rank 1
Anthony
Telerik team
Share this question
or