Mouse.Click Event in Coded Ui Testing

This is indeed a subject that we can ponder upon for hours and yet might not end up to figure out what can be done to sort this very issue. In QTP if we analyse the logic for the click event to be carried out , it is more organised and the co-ordinates do not have any role to be played in that case. However herein we have such dependencies that indeed reduces the robustness of this very tool. VSTS Coded Ui Testing does not support the organized hierarchial existence of the controls. Herein we have a separate segment or rather technically speaking we can term it up as region which is exclusively called as the Params region which has in it the properties of the specific control.


Some Related posts on Coded UI Testing using VSTS :
 


For example if you have captured three link buttons within the UI, what you can do is just have a look into the specific sections by finding the definition of the specific controls. You can see the associated set of properties with the control ids. Now again the polymorphism of the OOPS concept can be brought to use by using the property values fields to override the same from within the test file.


Also at times we can come across the scenarios wherein  we might have to record five thousand scenarios wherein all is common but we need to move to the next page by clicking some next link from the UI. What happens here is that , we can click on two, see and visualize the properties therein and then loop it based on some conditions. This is actually how automation testing with Coded Ui can be progressed. Just pick up those properties and put in the uimap.cs file and use some iterative loop to control the flow.

More On Code Customization In Vsts Codedui Testing

1 comment:

  1. Hi Viplav,
    I had a query can we not directly write the mouse.click event instead of recording the complete workflow.For example, in case i record a sequence of sign out link click, the recorded set of steps show it as a new function, instead of recording, can we not just declare the variable object as per the hierarchy and perform the click event as we do in QTP ?

    ReplyDelete