“Cannot perform 'Click' on the hidden control.” - Visual Studio 2012 only

試著忘記壹切 提交于 2020-01-07 03:01:08

问题


I'm recording a CodedUI test in Visual Studio 2012 and when I try to play back a simply "clik this link" recording, I get the following error.

Message: Test method CancelSubmission.SubmitCancel.SubmitCancelMethod threw exception:

Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException: Cannot perform 'Click' on the hidden control. Additional Details: 

TechnologyName:  'Web'

ControlType:  'Hyperlink'

TagName:  'A'

Id:  'CustomNav_lbBox4'

Name:  ''

Target:  ''

InnerText:  'Cancel Service Here'

 ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F002

What's puzzling is this test was working in VS 2010; we just upgraded to 2012.

So I figured there might be some differences in how the controls are recognized between the two version of VS so I re-recorded the clicking of the link, and this error is what I'm getting.

I tried re-recording the entire test in VS2012 that I had done in 2010 but I'm having all sorts of playback problems - in addition when I'm navigating through the site that I'm testing, I keep seeing warnings pop up in the action recording box that read something like:

"The following element is no longer available: IE web control; Process Id [4296], window handle [1115150]"

-The issue is clearly with VS2012 since neither the site, nor the browser I'm using changed. Everything is the same with exception to the VS version i'm running.

Any ideas what the cause/solution may be?

EDIT: Apparently this isn't a VS2012 issue. The release of a buggy security patch KB2870699 just so happed to coincide with our systems being updated to VS2012; Another feather in the cap of the "correlation does not imply causation" argument.

来源:https://stackoverflow.com/questions/18900119/cannot-perform-click-on-the-hidden-control-visual-studio-2012-only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!