no Element name, no control name, no controlid ???

Ask general questions here.
64bit
Posts: 1
Joined: Mon Sep 15, 2008 9:05 pm

no Element name, no control name, no controlid ???

Post by 64bit » Mon Sep 15, 2008 9:18 pm

Image

I wrote a chat application myself with C#. Now I want to select the text in a textbox where the arrow is pointing but I'm lost trying that out. Can you give me any solution to my problem? pls an example code would be appreciated.


Thanks
Andrew

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Sep 16, 2008 8:11 am

Hi Andrew,

It seems to me, that you're application is based on WPF (.NET 3.5). To automate your textbox control you have to set a value for the property AutomationProperties.Name within your WPF-XAML code as follows:

Code: Select all

<TextBox Margin="135.389,128.05,184,124.95" Name="textBox1" AutomationProperties.Name="MyTextBoxID"/>
After that, you should be able to identify your text box with Ranorex Spy.

kind regards,

Christoph,
Ranorex Support Team