Find the control–a way to stabilize UI automation… a bit
May 23, 2012
I have been diving deep into automating web pages for my current client. I have a love – hate relationship with this. It’s quite cool but I would also recommend against using it. I wrote about why just a post or two ago so I won’t repeat it here.
In this post I will instead acknowledge the fact that we are going to automate against the web page and do our best to handle the brittleness of such tests. One challenge that you are facing when writing code to automate elements of a page is to actually get hold of the elements themselves. This is done in different ways with different automation frameworks, but typically you can search by Id (or other attributes on the elements), order in the page, and position.
In this post, I will examine those different approaches and suggest one way that I’ve found...