locked
Problems Generating Methods with the Coded UI Test Builder RRS feed

  • Question

  • Previously, I had been having problems opening the Coded UI Test Builder. Specifically, I was getting an error message that "an item with the same key has already been added" when I would try to open it. This issue was caused by a duplicate node within the ExecuteActions section of the "uitest" XML file that got created by accident when a co-worker and I merged our changes. By deleting one of the duplicate nodes, I was able to resolve the issue and open the Coded UI Test Builder without error.

    I am now able to record actions with the Coded UI Test Builder, but when I attempt to generate a method from the recorded actions, I get an error message "UIObject with Id UICreateHyperlink1 was not found." I tried to rename my existing UIMap and then create a new one. This allowed me to generate methods using the Coded UI Test Builder in the new UIMap, but this caused me to get a lot of build errors due to naming conflicts. With just my existing UIMap, I am able to build and run without error. What is the best solution to this problem? Should I create the new UIMap and hope that I can resolve all of the build errors manually? I would prefer not to have to create a second UIMap, but if there is no other way to continue, so be it. How do I prevent this type of problem in the future?

    • Moved by Figo Fei Tuesday, July 27, 2010 7:38 AM (From:Visual Studio Team System - Testing)
    Friday, July 23, 2010 8:43 PM

Answers

  • The first problem is a known issue with Coded UI Test Builder. We are working on releasing a fix for this. The workaround is to add a new UI map and record actions and add assertions in it.

    Your error message for the second issue indicates that the merge that you performed was not complete and some objects are not present in the merged UI Test file. Please verify that the object with id 'UICreateHyperlink1' is present in the UITest file. ALternately serch for a reference to this object in the UI Test file and rename it to the merged object.

    Monday, August 9, 2010 10:52 PM
    Moderator