Mockup Tutorial


In this lesson, we will build a simple test case based on a mock-up. You can download mockup that we will use in this lesson from ZAPTEST demo page open downloaded mockup in some image viewer, let’s add this mockup to the Object Repository. Click Scan GUI to scan application then click on the image viewer with the mock-up image opened. Define the new application and view as we did in the first lesson then remove all elements except labels, textboxes and the registration button. As you already know we should use relative objects for textboxes. click select relative object button in object properties of first name textbox, then click on the first name label now we have to do the same for other three objects - last name, username and password text boxes Now we will save our test case and are ready to write the script like we did it before First we should launch the browser application using launch method then check if the page been loaded – using exist method And then – fill in the registration form – using type method we will Define table parameter for each input, it give us the ability to make multiple iterations in the future. So now we have added four steps into our script which will fill in the registration form. final element is to click on the register button. also we should close the application at the end of the test case. just for our convenience we will add a table parameter for the browser name. It will give us the ability to do cross-browser testing But how do we check that the user is indeed registered since we have only one mock-up view. For now, we can simply add a new object and set the text which would appear when the registration is successful. Go to the object properties and set the text property to the successful registration message. Now we should only apply the exist method to this object at the end of the registration process. Our script is ready - let's run it you can see that Zaptest has performed all of the operations against the real website and it even verify the registration status. in addition we can set text parameter for the object within the script – we have a special method - set property. It means that we can define a special variable for registration text until the website is developed and update it later via script or just use the data table Thank you for using zaptest

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227