<section> and CUITe

Jan 15, 2014 at 6:47 PM
Hello all,

I've come across a problem attempting to use <section> elements in VS2010 and CUITe.

The <section> in question has a div with no id as a parent and is therefore obtained through that div's parent div with and id of "content-wrapper". Using getChildren(), I obtain the <section> element's parent.

CUITe_HtmlDiv overAllContentWrapper = Get<CUITe_HtmlDiv>("id=content-wrapper");


attempting to get the section element as a child gives this exception:

attempting overAllContentWrapper.getAllChildren()
base {System.Exception} = {"You are trying to traverse to an element/control which is not present in the tree: (HtmlDiv).FirstChild"}

Has anyone else encountered something similar?
Jan 16, 2014 at 6:56 AM

Is Visual Studio's built-in Coded UI Test Recorder able to generate the appropriate code for your needs?

Thank you.
Jan 16, 2014 at 12:38 PM

The end goal is just to verify that a specific block of text exists within the section.
As there is nothing to record for that assertion, I don't believe VS Coded UI Test Recorder will be able to generate the appropriate code.

Thanks for the reply.
Jan 27, 2014 at 10:04 AM

I think that you can use htmlcustom for your problem and do your assert with this.
Jan 31, 2014 at 7:34 AM
Visual Studio's built-in Coded UI Test Recorder has a crosshair tool that can be used to add assertions on specific properties on a specific UI control.