You can explore the DOM tree during a recording session and build element steps. To do that, you need to select the target element in the DOM Explorer tab first.
When you select an element from the DOM Explorer, you will see the Actions and Verifications tabs with available steps for that element. Each of those tabs has different types of steps that you can configure and add to your test. Simply choose the required step and click the Add Step button. You can make additional configurations to the newly added step in the Step Properties pane in Test Studio.
You can also build steps from the Step Builder in Test Studio, after the recording session is closed.
In order to automate your test scenario, you need to record different actions against the application under test. Test Studio will capture your mouse and keyboard actions automatically, but you can also add more actions. Check out the 3 categories below:
Mouse Actions are invoked as if the real user was directly using the mouse. They range from different Left and Right mouse button actions to hover over and drag & drop actions to cover all scenarios.
Scroll Actions are used to ensure that the element is visible on the screen. You can scroll the application in three different ways - top, bottom and center.
Once you have added the necessary actions, you still have to verify that those actions lead to a successful result and everything happened as expected. There are several ways to verify elements in Test Studio:
Quick Verification - create an easy verification from the Quick Tasks menu.
Advanced Verification - craft a custom verification from the Sentence Verification Builder.
Wait - does not continue until the comparison is true.
Extraction - extract an element's value and reuse it later in your test.
Image Verification - this feature is based on an element’s visual rendering rather than the properties or attributes of that element.
Text from Image - this feature checks the text from an image and compares it to the expected value.
Verifications in Test Studio allow you to:
- Measure against multiple criteria at one time.
- Build these measurements in an interactive manner without code.
- Detect if elements are in a particular state (e.g. is visible, exists).
- Detect if attributes and properties compare with specific values.
- Verify content, attributes, images, image texts, styles, visibility, drop-down list selections, checkboxes, radio buttons, tables and Silverlight property values.
Test Studio implements verification through "sentences" that compare a portion of an element to a value, such as:
- textbox content is equal to 'order 2011'
- image path contains 'http://www.telerik.com'
- wait for element to exist
Test Studio cannot read and verify against the contents of a PDF file loaded in the browser, as it does not have a DOM structure like a traditional web page. If you can store that information in a file type such as XLS, XML, CSV, or a SQL database, then you can use the Data Driving feature.