locked
Object with ID not found error RRS feed

  • Question

  • We have a form that has 2 tabs and the first tab has group boxes as well as an editable datagrid.  One of the group boxes has a search button that populates the editable datagird.  The test is to just uncheck one checkbox and click the search button in order to get the records in the datagrid.  When we try to generate code we get an error that says The UIObject with Id UITotalbyVendorWindow was not found.  If we do an assertion on this field and delete the control name and then record the script we won’t get this error again but another field is not found. We're using the official release.

    Thanks,

    Oleg

    Thursday, May 20, 2010 1:39 PM

Answers

All replies

  • Oleg,

    This is a known issue and we are working on the fix. Currently no ETA on when it will be released.

    For now, please create a new Coded UI Test Map and add assertion for the control in the new UI Map.

    [This is a temporary workaround till we release the fix for the issue.]

    The following link describes workin with multiple UI Maps. http://blogs.msdn.com/b/anutthara/archive/2010/02/10/walkthrough-using-multiple-coded-ui-maps-in-test-automation.aspx

    Mathew.

    Tuesday, June 8, 2010 5:18 AM
    Moderator
  • Hi Mathew,

    I have the same problem when trying to add existing action recording to test that already has .uitest.

    I created another uimap containing assertion for the not found object.

    I verified the object exists in the new uimap.

    I also copied the object to the first uimap.

    I still can't add the existing action recording - the object is not found.

    do I miss something ?

    thanks, Ayelet

    Tuesday, July 20, 2010 7:31 AM
  • Hi,

    I found a slightly easier workaround than adding assertions.  Basically you can add the control to the UI Control Map.  Here are the steps. 

    1. Close Test Build (Has pending changes in it already and will give the error "An item with the same key as already been added."
    2. Reopen the Test builder
    1. Click on the assertion cross hairs
    1. Drag it to the item
    2. Click the fan out << option to display the UI Control Map
    1. Click on the Add Control to UI Control Map (Ctrl+C)
    2. You see a message "Selected control has been added to the UI control map"
    3. Then click "Generate Code"
    1. There will be no option for a method because this is just generating the object.
    2. Click Generate
    1. Now you can record you process like normal.

     

    I hope it helps.

     

    Mike


    blog - http://www.codesmartnothard.com
    • Proposed as answer by Kodez Tuesday, February 15, 2011 9:13 AM
    Thursday, August 26, 2010 2:56 AM
  • Mike,

    Thanks a million, you saved my day !!!!.

    The workaround you suggested (Ctrl+C) works beautifully.

    Cheers

    Harris

    Tuesday, February 15, 2011 9:13 AM
  • You need not do these workarounds if you have Visual Studio Service Pack 1 beta release installed. Please install it from the following link:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=11ea69cb-cf12-4842-a3d7-b32a1e5642e2

    Let us know if it does not help you.

    Thanks.

    Tuesday, February 15, 2011 3:51 PM