As a fix searches were narrowed by providing a more specific search, such as '//tr[@id='errorField1']/td[2]'.
Locators starting with '//*' search any element node from the current node that match the selection no matter where they are, been therefore very expensive.
So the general recommendation is: be specific. Try to provide the node you want directly, ideally, a specific id should be provided, i.e. 'id('errorField')//' (although there are known issues in IE6).
Despite the fact that I'd rather see a better performance when advancing versions, the moral is: don't skimp on defining ids in your DOM, the more the DOM is properly marked the easier and faster it is to be tested. Keep in mind that acceptance tests are time consuming and performance improvements are greatly appreciated, especially if you run them as part of your continuous integration build.
No comments:
Post a Comment