locked
Coded UI: Access is denied and UISpy can't identify the buttons control

    Question

  • Hi:

        I am testing an application. I tried to use coded UI to record the operation. it shows "Access is denied".  I saw similar posts like this, the answer is the previledge issue.  I run the application and vs in Admin previledge.  The issue still happens.

        Then I tried to use UISpy to get the automation id of the controls in the application. But it can't identify the buttons. all the buttons are identified as "Control.Pane". 

        I lauched another applications and UISpy can identify the buttons.  

        In other machine, the UISpy can identify the buttons controls of the same application. The coded UI also works. 

        I wonder there is something wrong in my machines. 

        Anybody has solution for this? thanks 

    thanks 

    mztest

    Monday, September 24, 2012 1:29 AM

Answers

  • Hi Amanda:

               thanks for your reply.

               I checked the CodedUITestBuilder.exe.config. I found this file missed the following:

     <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
      </startup>

    After I added them, the coded UI and UISpy worked.

    I am not sure why my file lost the above information.  I installed the visual studio 2012 RC trail, maybe it is the reason.

    Is it ok to install visual studio 2010 ultimate and 2012 rc trail in one machine?

    appreicate your help!

    MZTest


    Wednesday, September 26, 2012 3:29 AM

All replies

  • Hi:

        I am testing an application. I tried to use coded UI to record the operation. it shows "Access is denied".  I saw similar posts like this, the answer is the previledge issue.  I run the application and vs in Admin previledge.  The issue still happens.

        Then I tried to use UISpy to get the automation id of the controls in the application. But it can't identify the buttons. all the buttons are identified as "Control.Pane". 

        I lauched another applications and UISpy can identify the buttons.  

        In other machine, the UISpy can identify the buttons controls of the same application. The coded UI also works. 

        I wonder there is something wrong in my machines. 

        Anybody has solution for this? thanks 

    thanks 

    mztest

    Monday, September 24, 2012 1:43 AM
  • Please check the browser which one you are using and the controls are supported or not.

    Some of the browsers and operating system may not support the coded ui recording.

    and check your system all the tools are installed or not for coded ui supporting .


    Santi.

    Monday, September 24, 2012 5:15 AM
  • Hello Mztest,

    Thank you for your post.

    I would like to know if you get the issue when you record actions on an application.

    If so, you can reference the following articles to check if they help.

    FAQ: Why am I getting “access denied” during

    FAQ: Why can’t I record actions on an application ?

    In short, you can’t run Visual Studio and application with different users or same users but different admin privilege. And if it is involved to IE, you need to make sure that you are running IE as Administrator.

    In addition, on another machine, can you record actions on the application successfully? And can the UISpy identify the button controls of the application fine?

    If so, there should be not anything wrong with your controls of the application.

    I suggest that you can try to test other applications and record actions on them to check if it works fine.

    You also can reference the following articles to see supported configurations and platforms for coded UI tests and action recordings in Visual Studio 2010:

    http://msdn.microsoft.com/en-us/library/dd380742(VS.100).aspx

    If possible, you could provide more information about the error for resolving the issue.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 24, 2012 6:29 AM
    Moderator
  • Hello Mztest,

    What about your issue now? Any update?

    If the suggestion above is not helpful, you can check the CodedUITestBuilder.exe.config file to ensure the application has been added in the ExcludeProcess section. Also verify the IncludeProcess configuration. If another particular process has been added in IncludeProcess, then actions on your application will not be recorded. Also you can add IncludeProcess for your application to check if it helps.

    For more information, you can reference this blog: Coded UI Test–Record one application only

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, September 25, 2012 10:13 AM
    Moderator
  • Hi Amanda:

               thanks for your reply.

               I checked the CodedUITestBuilder.exe.config. I found this file missed the following:

     <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
      </startup>

    After I added them, the coded UI and UISpy worked.

    I am not sure why my file lost the above information.  I installed the visual studio 2012 RC trail, maybe it is the reason.

    Is it ok to install visual studio 2010 ultimate and 2012 rc trail in one machine?

    appreicate your help!

    MZTest


    Wednesday, September 26, 2012 3:29 AM
  • Hello Mztest,

    Glad to see this issue has been resolved and thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.

    In addition, sometimes installing VS2010 and VS2012 on the same machine may cause many problems.

    For detailed causes, you can reference my reply in the following thread:

    http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/1cfda153-e817-4911-b657-9da20cc5940f/

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, September 27, 2012 12:36 AM
    Moderator
  • Hello All,

    I am facing the same issue while running the coded UI recorder in Visual Studio 2012 Ultimate.

    I checked the CodedUITestBuilder.exe.config for the config, mentioned above, but it was proper.

    Also, I am running both VS and IE as Admin, still the issue persists.

     Please help.

    Thanks in advance,

    Someswara S

    Monday, October 22, 2012 11:59 AM