This project is read-only.

Table methods not working

Aug 10, 2011 at 9:24 PM
Edited Aug 10, 2011 at 9:30 PM

Cuite looks pretty slick with the object recording stuff, however i am hungup on this 1 problem that's making me worried..

I get a  System.InvalidCastException: Unable to cast object of type 'Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlControl' to type 'Microsoft.VisualStudio.TestTools.UITesting.HtmlControls.HtmlRow'.

when i'm trying to call any of the table methods FindCellValue, FindRow...

In my object declaration i have a

public class SomeMainPage : CUITe_BrowserWindow
        public new string sWindowTitle = "XYZ";
        public CUITe_HtmlTable tblCalculator = new CUITe_HtmlTable("Id=calculator");


And in my script i'm making the call

public void TestMethod1()

            SomeNamespace.SomeMainPage mainPage = CUITe_BrowserWindow.GetBrowserWindow<Namespace.SomeMainPage>();
            mainPage.tblCalculator.FindCellAndClick(3, 3);


What am I doing wrong? Please advice!

NOTE: I am using Cuite 1.02.

Aug 11, 2011 at 4:29 AM
Edited Aug 11, 2011 at 4:51 AM

Thanks for using CUITe!

The issue may be due to nested tables. I will need the html code of the table to have a look. Please post it here.

Aug 11, 2011 at 4:54 PM

Thanks for the response. That's the code format of the table.

<div id="calculatorContainer">
    <div class="clear">
    <table id="calc">

Aug 16, 2011 at 3:20 PM

Able to reproduce the issue. Working on this.

Sep 7, 2011 at 10:17 AM


Any news on this? We are having the same problem.

Oct 11, 2011 at 3:24 PM

Hi, this is fixed and will be available from v1.04.

Feb 8, 2012 at 6:07 PM


I seem to be having the exact same problem in 1.0.4. The table I'm using is indeed complex (not testing friendly really) so that's probably the reason. Is there any updates on this or any possible workaround?

Feb 12, 2012 at 6:01 AM

Can you please try with 1.05? I have fixed some issues with CUITe_HtmlTable. If it doesn't work for you even with 1.05, please share the html code of your table. I will have a look.

--Suresh Balasubramanian

Feb 12, 2012 at 6:04 AM

I'll try tomorrow or on Friday. Thanks, I didn't know the project was back online.