Stack Tack Tack
Stack Tack Tack

Reputation: 129

Exposing a Custom Control to Coded UI Tests - WinForms

I wrote my own custom control in WinForms. It's actually works like a TextBox, but have other methodes and extra properties that I wrote.

I tried writing a very simple coded UI test for this control but faild. Every Time I select it with the Coded UI Test Builder it is shown as "Client" and not as a textbox. I cannot read or write to the text property of this control, or get or set other properties.

Do you know how do I expose my custom control for testing, and getting and setting all of it properties?

Upvotes: 2

Views: 1468

Answers (1)

Gunter
Gunter

Reputation: 11

It is difficult to answer the question without looking at your implementation of the custom control but you can use the following link to learn how to extend a treeview control to make it code UI enabled.

http://www.ranorex.com/blog/enabling-automation-by-adding-accessibility-to-windows-forms-controls

I used that example to learn how to extend my own controls.

Upvotes: 1

Related Questions