Hi All,

Automating legacy desktop application and trying to click a toolbar icon. That icon was able to identify by Coded UI, but unable to click. Please find the given error below. Also Coded UI takes 2-3 minutes to identify this icon. Anybody having solutions for this..?


Test Name: ClickTrial
Test FullName: Module1_MyApp.Module1_Demo1_Overall_test.ClickTria l
Test Source: C:\Scripts\MBT_CUI\Module1_MyApp\TestCases\Module1 _Demo1_Overall_test.cs : line 65
Test Outcome: Failed
Test Duration: 0:00:16.460084

Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Common.Que ryId.ParseQueryId(String queryIdString)
at Microsoft.VisualStudio.TestTools.UITest.Playback.S creenElement.FindFromPartialQueryId(String queryId, Boolean resetSkipStep)
at Microsoft.VisualStudio.TestTools.UITesting.UITestC ontrol.EnsureValid(Boolean waitForReady, Boolean refetch)
at Microsoft.VisualStudio.TestTools.UITesting.UITestC ontrol.GetPropertyValuePrivate(String propertyName)
at Microsoft.VisualStudio.TestTools.UITesting.UITestC ontrol.GetPropertyPrivate(String propertyName)
at Microsoft.VisualStudio.TestTools.UITesting.UITestC ontrol.GetPropertyOfType[T](String propertyName)
at Microsoft.VisualStudio.TestTools.UITesting.UITestC ontrol.get_Exists()
at Module1_MyApp.Module1_Demo1_Overall_test.ClickTria l() in C:\Scripts\MBT_CUI\Module1_MyApp\TestCases\Module1 _Demo1_Overall_test.cs:line 70
Result Message:
Test method Module1_MyApp.Module1_Demo1_Overall_test.ClickTria l threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: queryIdString

Parameter name: queryIdString System.ArgumentNullException
Microsoft.VisualStudio.TestTools.UITest.Common.Que ryId.ParseQueryId(String queryIdString)