Anton, the TestFirst AI Assistant, can help you with automating browser-based tests. Read this article to find out how to use it. |
You can hit CTRL+SPACE to trigger the auto-completer anywhere in the sentence to help you with writing the test case. |
We highly recommend you read this article before you begin. |
In order to automate a browser-based test case, in the TF Automate text pane:
- Type in the Scenario: keyword followed by the step title. Ex.:
Scenario: Visit the main page.
Hit Enter. - Start the first step with the
Given browser "<Browser>"
sentence that defines which browser to use, for instance:Given browser "Chrome"
. Hit Enter.Currently, TF Automate only supports Chrome. - Write the rest of the step using TestFirst Gherkin specification. Below you can find the most common sentences you can use for the action and the expected result part of the step:
- Action:
- When I visit "<URL>"
- When I click "<Selector>"
- When I hover on "<Selector>"
- When I type "<Text>" in "<Selector>"
- Expected result:
- Then "<Selector>" is displayed
- Then "<Selector>" is not displayed
- Action:
- Run the test as described in this article and make sure it runs successfully.
- Save the test by clicking the Save icon above the text pane.
- Publish the test by clicking on the Publish icon (checkmark) above the text pane to change the automation status of the test case to Automated (read more on statuses here).
Within the same step indicated by the Scenario keyword, you can only use When and Then sentences once. Any further action or expected result should be started with the And keyword. Ex.: Scenario: Verify the SIGN IN and START NOW buttons are displayed on the Pricing page |
In TestFirst Automate, selectors can be described in one of 3 ways. 1. AI Selectors 2. Quick Selectors 3. Custom Selectors AI Selectors is the recommended and the most reliable way of describing selectors. For more information on selectors and their uses, please read this article. |
Comments
0 comments
Please sign in to leave a comment.