How can I get the contrl of an item that has no name/id shown. Its actually a text box and spy shows no name and Id except for class is Internet Explorer_Server.
Whats the solution?
Control with no name and ID
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
You can use the following code, if the index of the text box remains the same:
1. Read all text boxes with Element.FindChildren:
2. Use the index to get/set the value of the text.
Hope this works.
Jenö
Ranorex Team
1. Read all text boxes with Element.FindChildren:
Code: Select all
Element[] editFields = control.Element.FindChildren(Role.Text);
Code: Select all
editFields[index].Value = "new text";
Jenö
Ranorex Team
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact: