|
Exceptions are part of software engineering but we need to have efficient means to handle them so that the normal execution of the software continues with minimal effect on the code or the data.
Web testing also handles such situations and facilitates you with options so that you can decide what to do when exceptions are encountered.
Web Test module allows you to handle the following types of exceptions.
|
PopUp Exceptions |
|
|
Web Exceptions |
This refers to exceptions such as Page/URL not found when trying to access a page in the internet. Assume you had recorded the page at http://www.abcd.com/index.html but that page does not exist anymore. Hence during playback, Page/URL not found exception is encountered. |
|
Script Exceptions |
This refers to the syntactical incorrectness in the webscript. For e.g. assume you are inserting a built in function manually and instead of linkGetInfo() you have typed linGetInfo(). |
|
Object Exceptions |
This refers to a variety of exceptions related to the HTML objects in the page under recording. For e.g. during recording a HTML Text object named user_name was recorded but during playback it was not found as the page has been changed. In this case, ELEMENT_NOT_FOUND exception will be thrown. |
Popup and Web Exceptions
To handle popup and Web execptions, Web Functional Test provides "Exception Handling" options which can be configured by choosing the Settings tab in the Web UI.
Refer to the context sensitive help details.
Script and Object Exceptions
You need not handle these explicitly. Web
Functional Test takes care of logging these in the log files and
continue the test case execution as appropriate. You will be able to
see these in the log files. In case of object exceptions, you can use
the callScript function to call another script to perform some specific
operation based on the exception received.
Javascript Errors
Any javascript error in the web application occured during
script execution will be reported to the Summary report for debugging.
|