How to locate the html tags with dynamic ID

Ask general questions here.
Dale Nikola
Posts: 4
Joined: Sat Oct 08, 2011 5:16 am

How to locate the html tags with dynamic ID

Post by Dale Nikola » Thu Oct 20, 2011 4:20 am

Hi

Please tell, how to locate the control which generates ID dynamically ?
My problem is : My test project requires four sections:Create,edit,revert and delete a username. Every time create,the username will generate a Id in the database.Then the problem occurs, I create a user(e.g: Id:12) ,after edit,revert and delete,now I run the script, it creates a user (id 13) again ,then it edits ,failed...revert and delete failed too.
I find the ranorex locates the element by html tags and the corresponding specific Id.But the Id is generated dynamically ,how can I handle the problem?


Thanks.

Regards.
Dale Nikola.

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

Re: How to locate the html tags with dynamic ID

Post by Support Team » Fri Oct 21, 2011 9:44 am

Dale Nikola wrote:I find the ranorex locates the element by html tags and the corresponding specific Id.But the Id is generated dynamically ,how can I handle the problem?
I would suggest you to find another attribute to identify your element. Therefore I would suggest you to read following blog http://www.ranorex.com/blog/ranorexpath-tips-and-tricks

Regards,
Peter
Ranorex Team
.
Image