The first function I would like to test is the log in function, and I will test the followings:
- log in as a confirmed user
- log in as a non-confirmed user, certain function should not be available (see post#6)
- log in redirect function, i.e., from page A, choose log in, then the borrower should be redirected to page A (see post#5)
Now let’s test “log in as a confirmed user”. This is just a simple recording and playback, nothing I need to explain I guess. Oh, just remembered one thing, this test will be saved as an action called “log in”, and since this action will be called in most of our future tests, so please make this action a reusable action. How to make a reusable action? You can find the answer in the QTP Basic Features User’s Guide.
Browser("Login - YouPlayoff").Page("Login - YouPlayoff").WebEdit("name").Set "JraphicQesign"
Browser("Login - YouPlayoff").Page("Login - YouPlayoff").WebEdit("password").SetSecure "4c02..."
Browser("Login - YouPlayoff").Page("Login - YouPlayoff").WebButton("Submit").Click