This project is read-only.

Unable to click a cell on a Silverlight table

Oct 31, 2013 at 10:15 PM
Hi,

I have been trying to work with a silverlight table.

So far the below commands work:
        int numberofrows = objreporsitory_Table_Specifications.RowCount;
The below lines of code fail -->
        objreporsitory.Table_Specifications.FindRowAndDoubleClick(0, "xxxx");
        objreporsitory.Table_Specifications.FindRowAndClick(0, "xxxxx");
Result Message:
Test method DTAF_Draft.Tests.Modules.D3_Venio_Spec.D3_Venio_Spec_test threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnBlockedControlException: Another control is blocking the control. Please make the blocked control visible and retry the action. Additional Details: The control details were not specified. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0xF004F003
Result StackTrace:
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.DoubleClick(Int32 x, Int32 y, Int32 nButton, Int32 fEnsureVisible, String bstrKeyModifiers)
at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.DoubleClick(Int32 x, Int32 y, MouseButtons button, ModifierKeys modifierKeys, Int32 ensureVisible)
at Microsoft.VisualStudio.TestTools.UITesting.UITestActionExecutorCore.DoubleClick(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String actionName, UITestControl uiControl)
at Microsoft.VisualStudio.TestTools.UITesting.UITestActionExecutorCore.DoubleClick(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass9.<DoubleClick>b__8()
at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClick(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinates)
at Microsoft.VisualStudio.TestTools.UITesting.Mouse.DoubleClick(UITestControl control)
at CUITe.Controls.SilverlightControls.CUITe_SlTable.FindRowAndDoubleClick(Int32 iCol, String sValueToSearch) in c:\CUITe\DTAF_POC\CUITe\Controls\SilverlightControls\CUITe_SlTable.cs:line 47
at DTAF_Draft.Tests.Modules.D3_Venio_Spec.D3_Venio_Spec_test() in c:\CUITe\DTAF_POC\DTAF_Draft\DTAF_Draft\Tests\Modules\D3_Venio_spec.cs:line 76


I realize that this control may be blocked/hidden to the automated script but it certainly is accessible to the user.

Any help is appreciated.



Regards,
Ankit
Nov 8, 2013 at 9:14 AM
Hi Ankit,

Does it work if you try to playback the test recorded using the Visual Studio built-in Coded UI Test recorder?

Thank you.