Use the Selenium Integration test steps to import a JSON test script that you created in Selenium Builder to create a test step or script that is based on that JSON file.
Follow these steps:
The Import tab of the Selenium Integration page opens.
Imports the complete JSON test script in one test step. This option also supports Selenium Builder suites.
Divides the JSON script to create a separate test step for each action in the script. This option does not support Selenium Builder suites.
A new step (Selenium Step) or new steps (Selenium Script) appear in your test case.
The Selenium Integration Import dialog opens. This page notifies you of any warnings or errors that occurred during the import. The page also shows you the number of steps that the import process generated.
The Selenium step can provide "inline" alert handling. The fields in the Alert Behavior area work in parallel with the value of the unexpectedAlertBehaviour parameter, which is defined in the file that is named by the selenium.WebDriver.DesiredCapabilities.filePath property.
These fields let you specify how the test step should react to a modal alert dialog displayed in the web app.
Defines the action to take in response to a modal alert dialog.
Values: Accept, Dismiss, Answer
Defines text to input when the Alert Action is Answer. The step inputs the text that you put into this text box, then clicks OK.
Defines the action to take if a specific step in the test case fails. Select the step to execute (Go to:) or the action to take if the step fails. For more information, see Configure Next Step and Generate Warnings and Errors.
Note: The JSON script supports variable substitution by property for any value that you input. You can also use properties with encrypted values, such as {{password_enc}}, to avoid exposing sensitive data.
The following Selenium Builder steps are mapped to your test case as described:
The name/value pair becomes a standard property in your test case. The name is prefixed with "selenium" to distinguish it from other properties. For example, the following JSON definition becomes a new property with the name selenium.window_title. The value is populated after the step runs.
{
"type": "storeTitle",
"variable": "window_title"
},
The verify step in Selenium Builder is used to validate user interface elements. If the validation fails, the state of the step is set to ERROR, but the test case execution flow continues to the next step. An associated DevTest error event (in red) is created for the failure.
The assertion step in Selenium Builder validates user interface elements. If the validation fails, the state of the step is set to FAIL, and the test case execution flow stops. An associated DevTest error event (in red) is created for the failure.
If a saveScreenshot step in your script does not include a full path for saving the screen shot, DevTest tries to create the file under a $LISA_HOME\tmp\selenium directory. You can also use variables for the supplied file name. For example:
c:\testcase1\snapshot1-{{LISA_TEST_RUN_ID}}.png
or
c:\{{testCase}}\{{LISA_TEST_RUN_ID}}\snapshot1.png
If any part of the parent directory for the target file does not exist, that portion of the directory is automatically created. If the target file already exists, it is deleted before writing new data.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|