locked
Cannot perform 'Click' on the hidden control. Web Application buttons RRS feed

  • Question

  • I'm trying to automate testing a web app (html + javascript + css, etc.) with VS Coded UI Tests

    I can get to the page just fine, but when I want to click on a button I get the following error. I'm able to load the page to the same state and in the UIMap locate the control (highlights control just fine). But, when I run the script, if I call DrawHighlight on the same element, it will not draw the highlight.

    Any ideas on how to make the script find the button? Is it not waiting long enough somehow for the app to load? Parts of the app are delay loaded. I added Playback.Wait(5000) before and after drawing and that didn't help. Thread.Sleep doesn't help it be findable either. Thoughts?

    Result Message:
    Test method CodedUITestBlueChicken.CodedUITest1.CodedUITestMethod1 threw exception: 
    Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details: 
    TechnologyName:  'Web'
    ControlType:  'Custom'
    TagName:  'A'
    Id:  'flyoutWordViewerEdit-Medium'
    Name:  ''
     ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F002

    Friday, October 18, 2013 7:03 PM

Answers

  • My default search criteria was too hardcore apparently. I removed some of it and it was able to click on the element that I wanted.
    • Marked as answer by Mock Object Saturday, October 19, 2013 1:36 AM
    Friday, October 18, 2013 9:59 PM

All replies

  • One thought, and I'm still searching to see if it's true or not. The control that I'm trying to click has a onmousedown() handler, but not a click() handler.

    Could it be that?

    Friday, October 18, 2013 9:06 PM
  • My default search criteria was too hardcore apparently. I removed some of it and it was able to click on the element that I wanted.
    • Marked as answer by Mock Object Saturday, October 19, 2013 1:36 AM
    Friday, October 18, 2013 9:59 PM
  • It also helped to upgrade my VS 2012 sp3 to sp4 RC. lots of bug fixes in the framework there.
    Saturday, October 19, 2013 1:36 AM
  • Hi,

    Glad to see this issue has been resolved. Yes, Visual Studio 2012 Update 4 RC fixes many issue. When you encounter some issues, and you are still using VS2012, you can consider to upgrade VS first.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 21, 2013 5:20 AM