This project is read-only.

Com Error When Setting Text of a CUITe_HtmlEdit

Jul 7, 2014 at 4:52 PM
Edited Jul 7, 2014 at 9:35 PM
This error seems to only occur when switching from Winform back to web automation. The Web based task is to upload a file, which brings open the Window's File browser. Choosing the file is automated through CUITe_Win... type objects. After the file is chosen, you may edit file details from the web page. This is where the problem comes in. Here is the error and stack trace:

System.Exception: Test failed on step 14 - iteration 1. ---> Microsoft.VisualStudio.TestTools.UITest.Extension.PlaybackFailureException: Cannot perform 'SetProperty of Text with value "test.log"' on the control. Additional Details:
TechnologyName: 'Web'
ControlType: 'Edit'
Id: 'file-name'
Name: 'Name'
TagName: 'INPUT'
---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.SendKeys(String bstrKeys, Int32 nKeyboardAction, Int32 nSendKeysFlag)
Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.SetValueAsEditBox(String value, Boolean isEncoded)
Microsoft.VisualStudio.TestTools.UITesting.TechnologyElementPropertyProvider.SetValueAsEditBox(UITestControl uiControl, String value, Boolean isEncoded, Boolean useCopyPaste)
Microsoft.VisualStudio.TestTools.UITesting.HtmlPropertyProvider.SetPropertyValue(UITestControl uiControl, String propertyName, Object value)
Microsoft.VisualStudio.TestTools.UITesting.UITestPropertyProvider.SetPropertyValueWrapper(UITestControl uiControl, String propertyName, Object value)
Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SetPropertyValue(String propertyName, Object propertyValue)

Three things to note:
1) The Web control is found correctly (can be clicked on and other actions, but set text fails)
2) Removing Winform CUITe control and doing that section of the test by hand allows the test to pass.
3) The Browser page seems frozen and controls are not even accessible manually when this error occurs.

Windows 7
IE 9

Help is appreciated.


The Winform control for the Open file dialog does not need to be removed. I've noticed that clicking the "Open" button via the CUITe_WinButton.Click will pass, but the page will then freeze. Doing the same but with the action CUITe_WinButton.PointAndClick will pass without freezing. Is it probable that CUITe still has something to do with this issue?