gisiman wrote:what can I do?
As ciege already said: First search for a common parent element (e.g. "form1" or a "tbody" tag deeper in the hierarchy) and then always search relatively from this container element.
Another thing you can do is to create a Ranorex cache session for every web page. Using a cache session Ranorex retrieves all information only once from the Internet browser directly (usually a slow operation), stores all data in an internal cache and from then on only uses the stored data (quick). The bad thing is that as long as the cache session is active, you always get the same data, i.e. the data Ranorex stored on the first access to the element. So, whenever the web site changes, you need to end the cache session to get the up-to-date data:
// create a new cache session
using (new CacheSessionContext())
{
// first search will still be slow
InputTag tagMember = webDoc.FindSingle(".//input[@name='txtMember']");
// all following search operations should be much quicker
InputTag tagPwd = webDoc.FindSingle(".//input[@name='txtPwd']");
}
// cache session ended
Are you working with Internet Explorer? Automation of Internet Explorer (IE) is currently (Ranorex 2.2) much slower than automating Firefox, since the communication with IE takes much more time. We are currently implementing a IE plugin that will speed up the communication, thereby speeding up automation in IE to the level in Firefox.
Regards,
Alex
Ranorex Support Team