Our Web applications are so dynamic, HTML TD or cell numbers change in every build and it is challenging to maintain scripts under such circumstances.
I have used loops to search for a text and take TD or cell numbers from it but it is still a huge overhead and we are planning to replace our tool due to this issue. (To make matters worse, I have instances where the text I'm searching for is changing along with cell#s!)
I would appreciate if you can let me know your thoughts on how to eliminate this effort?
I have not used any other automation tools, it would be helpful to know how other tools work in such cases?
Thanks a ton in advance for your time and help.
No tool can help if the GUI object names or indexes change frequently. One possible solution is to map all your GUI objects to an XLS or CSV file. You need to keep updating this map file when ever the change occurs in the UI. This way your TP script will remain unchanged.
Not knowing your app, not sure if this will help... but it might. When I need to capture dynamic web text and I have something to key off of text/image/object etc, I use ElementID to do this. Examples:
If the above is 2 different cells (htmltd), they each have thier own properties including ElementID. You can capture the element ID of the Name HTMLTD object then capture text from what ever is in the next cell even if index or elementID changes...
theName = HTMLTD("ElementID=" & theID).InnerText</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">That example uses an HTMLTD object to get the starting ElmentID, but every type of object in the browser had an ElementID property (i.e. image, objects, etc) so just adjust accordingly. You can learn the ElementID property of an object using the Identify tool.
The only way this will not work is if a new object is inserted between the two cells which is much less likely than other parts of the page changing.
Text comparision is working in many cases but as mentioned in your example, objects are being added/inserted in between cells, and each page on an average has nearly 30 fields making it a nightmare to maintain scripts.
I'm trying to educate developers about the tool and how their coding changes impact scripts.