Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Can't access caption of a PopupControlContainerTool which shows up as WinButton
posted

Hi,

The app I'm trying to test (with CodedUI and VS 2010 sp1) has a button that displays the string 'MyLogin'.

The button was created as  a PopupControlContainerTool whose text property is in  Login.SharedProps.Caption = 'MyLogin'.

My problem is that I can't access that string, because the code generated by CodedUi for that control is:

WinButton uILoginButton = this.myWindow.UI_frmMain_Toolbars_DoToolBar.UILoginButton;

The project has a reference to Infragistics4.Win.CodedUITest.UIA.VS10.v13.2.

How can I cast that WinButton into a PopupControlContainerTool so I can get the caption to verify it?

Thanks.