Every UI automation software uses some form of object repositories. Before diving into the need of those, first let us know what is an object repositories and how it affects UI automation.
When you record a action in the UI, the information about the object such as type,action performed,index in the page,input made if any and window name will be stored in a file. That file may be xml, excel,database,custom extension or binary format. At playback the object info is read and software will try to find the same object in the page to perform the same operation. The file in which the object stored is called Object Repository.
This object repositories work best when the UI doesn't change or web page has only static content. When the UI changes or the properties of object changed w.r.t page or entirely, then playback wont perform the action on that object.
Even if we assume that object properties is not changed, the reading and executing the test will take more time and will grow exponentially with number of objects stored. Whatever the file format, automation software need to read the file, search for the object and execute the desired action.
As most of pages has dynamic content and number of pages for any web hosted software increasing how do we tackle this issue?
My solution is simple. Get rid of Object repository or reduce the number of objects stored in that to minimum(subjective). Is that possible? May be.
QEngine has few functions to do this.
| Code: |
| fireEventOnChildElement(tagName,propertyName,propertyValue,
index,identifier,actionName,actionValue='',childpropname='', childpropval='',childindex=1,childRegExp='false',parentRegExp='false') fireEventOnElement(tagName,propertyName,propertyValue,index,actionName,actionValue='',regExpRequired='false') fireEventAtPosition(title,classID,xCoord,yCoord,actionName,actionValue='',waittime=1) fireEventOnObject(classID,type,xCoord,yCoord,actionName,actionValue='') |
Post Comment