Support for Accordion

Feb 20, 2012 at 6:30 AM
Edited Feb 20, 2012 at 9:12 AM

Hi Suresh,

The application I want to test uses Accordion to display menu for navigation to other pages. Some hyperlinks are grouped and collapsed by default. To navigate I need to click on section to expand it and click on hyperlink. Devs are using <h3 Id="" /> to display the Section.

CUITe Object recorder is not able to identify the object. So I tried to write class with HtmlCutom class like CUITe_HtmlParagraph to create object repository.

Object Repository -

public CUITe_HtmlHeading tab1 = new CUITe_HtmlHeading("id=NavigationLayout_accordion_Reports"


but test fails with null reference exception. Please let me know where  I am missing?

UI Control that needs to be clicked is -

<h3 tabindex="0" title="Reports" class="menuheader expandable ui-corner-all ui-corner-top" id="NavigationLayout_accordion_Reports" role="tab" aria-expanded="true" aria-selected="true" jQuery17106268933340040029="22">

Custom class created by me to identify <h3 /> -



public class CUITe_HtmlHeading : CUITe_HtmlControl<HtmlCustom>{

public CUITe_HtmlHeading() : base() { }

public CUITe_HtmlHeading(string sSearchParameters) : base(sSearchParameters) { }

public Type GetBaseType()

{ return typeof(HtmlCustom);



public void Wrap(object control)



this._control = control as HtmlCustom ;


this .fillSearchProperties();


this._control.SearchProperties.Add(HtmlControl.PropertyNames.TagName, "h3", PropertyExpressionOperator.EqualTo);






Feb 21, 2012 at 1:18 AM

Can you please send me the HTML for the page and an image marking the control you want to interact with?

--Suresh Bala