I've discussed overcoming the user interface/ web interface changes here. Script maintenance and related issues are discussed here. Take a look at the Script maintenance guide here. The examples used in those articles are simple ones. However, in real world testing, we'll encounter complex web interfaces to deal with.
We know we can use Dynamic Functions of QEngine to handle any element that is added dynamically in the web application. How about using those functions for a static element which might change in future.
Let me explain using an example. When I am automating OpManager, I've encountered a situation to check the device snapshot pages.
A,B,C are device names in the network. I need, QEngine to click on these links. Discovery of the devices will run on everyday to check the daily build performance of OpManager. If any device is down at the time of the discovery, it wont make into this list. Sometimes, the name of device may be changed or may be removed from network. When I record this page using QEngine, I've got this,
| Code: |
| clickLink("A",1)
setWindow( "OpManager",1) clickLink("Server",1) setWindow( "OpManager",4) clickLink("B",5) setWindow( "OpManager",7) clickLink("Server",1) setWindow( "OpManager",4) clickLink("C",5) |
| Code: |
| setWindow( "OpManager",1)
fireEventOnCellElement("main",1,2,"click","NONE","NONE","NONE","NONE",1) fireEventOnCellElement("main",1,3,"click","NONE","NONE","NONE","NONE",1) fireEventOnCellElement("main",1,4,"click","NONE","NONE","NONE","NONE",1) |
Post Comment