locked
Automation - Coded UI Test - Throws "Access is denied" error while recording. RRS feed

  • Question

  • Hi

    We are working with Coded UI testing automation for the past 3 months and using VS 2010 premium for the same. Everything was working fine till last week. 

    Now we are getting the following difficulties.

    1. While recording, we are getting the "Access is denied error"

    2. The test(playback) which were running smoothly, now throwing - 

    Test method DocumentAutomation.UnitTests.TestIt threw exception: 
    Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties.

    Help is appreciated.

    Thanks

    Babu

    • Edited by Babu_Pers Tuesday, November 27, 2012 7:25 AM
    Tuesday, November 27, 2012 7:12 AM

Answers

All replies

  • Hi Babu,

    Thanks for posting in the forums.

    Error messages you are getting might be because of multiple reasons.

    Can you specify if there were any changes that took place in any of the below categories from last week.

    VS version/update you made  Or

    in the applications you are testing Or

    in any user permissions required to access the applications.

    Thanks

    Wednesday, November 28, 2012 5:31 AM
  • Hi Pavan,

    Thanks for your reply.

    There were no changes in the specified categories.

    We have written plugin for MsOffice application. For eg- MS word 2010 will have our own menuitem, if we click that our application will start to work.

    We capture this in coded ui test Automation and was working fine. All of a sudden, automation could not click on our menuitem in MsWord, throwing "  UItestcontrolNotAvailableException - Access is Denied" error.

    We have other application which is working fine - both Recording & Playback - working fine.

    Even, when we try to capture something from Notepad, Windows Explorer are not working.

    We tried re-installing the VS 2010 premium also, but failed.

    Help is appreciated.

    Thanks

    Babu

    Saturday, December 1, 2012 5:37 AM
  • Thanks for Pavan’s help.

    Hi Babu,

    If possible, I suggest you record a new coded UI test in other machine, so we could make sure that whether it is related to the Environment. To make sure that it is not the coded UI Test build issue, how about recording a test for a simple app, does it work normally?

    Access is denied error.

    Sometimes it generated this issue if the test need to be ran in the VS as the admin.

    VSTS 2010 Beta 2 – CodedUI Test – Access Denied Error

    Access is denied when try to record any application in Coded UI test

    Maybe you could try to enable Tracing for “UI Test” Components to find more useful information.

    The following thread is about the similar issue, if possible, please refer it, and hope it could help.

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

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, December 3, 2012 7:19 AM
    Moderator
  • Hi Pavan,

    Sorry for the late reply.

    As you asked, right now I am using different m/c for my test  app and everything is working fine. The problem is only at my m/c and that only too, for accessing MS Office apps(Word, Excel, Outlook). My test in other apps are working

    Thanks & Regards

    Babu

    Friday, December 14, 2012 11:44 AM
  • Hi Babu,

    Glad to receive your reply.

    If the same test worked well in other machine, but it didn’t work in the specific machine, I doubt that it is related to your Environment.

    If possible, I suggest you record a new test in your machine, check it, if it still has the same issue, I suggest you repair your VS.

    Before repairing your VS, you could try the following steps.

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 2:13 AM
    Moderator
  • Hi Jack,

    Thanks for your reply.

    I too believe that the issue is related to the environment.

    I tried to record a new test. It throws "Access is Denied", while capturing the MS Office apps, windows Explorer....

    I had already uninstalled the VS2010 premium and its service packs and re-installed, but didn't work. I am not interested in OS re-install.

    Thanks & Regards

    Babu

    Monday, December 17, 2012 4:55 AM
  • Hi Babu,

    Maybe I misunderstood this issue, just to make this issue clearly.

    Do you mean that the same test project worked well in other machine? Since the coded UI test don’t support the Office Client Applications like this document.

    If we could make sure that the same test worked normally in other machine, I’m afraid that it is not the test issue. If you could record other tests and play back normally in your machine, so we could make sure that it is no the VS setup issue. If possible, you could try to close other processes in your machine, like the firewall, the anti-virus software and the third party tools. Please also try to use the windows update. And then record a new test for your app, check it again.

    If still no help, I’m afraid that you would re-install the OS.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 5:14 AM
    Moderator