No "Name" attribute for input type="text"

Class library usage, coding and language questions.
sahoko
Posts: 9
Joined: Tue Oct 09, 2007 5:07 pm

No "Name" attribute for input type="text"

Post by sahoko » Wed Oct 10, 2007 1:13 am

This text field control has the unique id property like this:

<input type="text" style="width:235px;" class="ig_ClaymationEdit igtxt_ClaymationEdit ig_e06f37d7_r1" id="igtxtctl00_ContentPlaceHolder1__CampaignPanel_igTxtCampaignName" />

But when I look at the attributes of this element with RanorexSpyPro, the "Name" attribute is blank.

All the text field controls in this page have the id property filled with a unique value, but the spy is not using the id property to identify the elements.

Is this a bug? If so, what is the workaround for this problem?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Wed Oct 10, 2007 6:30 pm

You cannot find an element in a web page by Id at the moment.
We will release the Web Testing extensions only in V1.4.

But you can find an element by Role and Location with the Element.FindChild() function.

Jenö
Ranorex Support Team

sahoko
Posts: 9
Joined: Tue Oct 09, 2007 5:07 pm

Post by sahoko » Wed Oct 10, 2007 6:36 pm

Hi Jeno,

Thank you for your quick response. When I look at this element in the spy, I get the "client position" and "screen position". Which value can I use as location?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Wed Oct 10, 2007 6:58 pm

I get the "client position" and "screen position". Which value can I use as location?
The client position.

Jenö
Ranorex Support Team

sahoko
Posts: 9
Joined: Tue Oct 09, 2007 5:07 pm

Post by sahoko » Thu Oct 11, 2007 8:22 pm

When I move the position of IE, the client position changes... Is there anything else that I can use in order to uniquely identify the object beside the client position?

I need to run my automation on different test clients, but if the client location changes if I move the position of IE, the script wouldn't be reliable.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Oct 11, 2007 9:43 pm

The client position is the position of the element, relative to the upper-left corner of the control.
Normally it remains the same if you move the window, if not then you should implement a workaround.

Please check the Element.FindValue, Element.FindChildren functions.

Jenö
Ranorex Support Team