Search…
⌃K

Selenium Script Converter

  1. 1.
    Log in as a valid Avo Assure user. Click on the ‘Selenium To Avo’ plugin from the landing page.
Avo Assure Landing Page

Prerequisites

2. From the 'User Profile', click on the 'Download Client' button.
Download SeleniumToAvo_client
3. The 'SeleniumToAvo_client' will be downloaded. Extract the downloaded package.
SeleniumToAvo_client package downloaded successfully
4. From the extracted package, copy the file path of 'Chrome extension.crx' within the assets folder.
Copy file path of 'Chrome extension.crx'
5. The copied file path <chrome_extension_file_path> should be added in the selenium script right after instantiating the web driver along with the following mentioned statements:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_extension("D:\SeleniumToAvo_Demo\SeleniumToAvo_client\assets\Chrome extension.crx")
driver0 = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)

Capturing Selenium Script Execution

6. Click the ‘Start Capturing’ button on the ‘Selenium Script Converter’ landing page.
‘Selenium Script Converter’ Landing Page
Note: If the selenium script to be converted is written in python (.py file), then launch the ‘Selenium Script Converter Client’ from the package provided. If the selenium script to be converted is written in any other language, then it should be executed manually.
7. If Selenium Script is written in python, launch ‘Selenium Script Converter Client’ and perform the below-mentioned steps.
  • Either select the script via the file explorer or provide the script file path at the ‘Select Selenium Script (.py)’ field.
Selenium Script Converter Client – Provide .py file path
  • If python is not installed in the default location (C drive), then the user can either select the python path via the file explorer or provide the custom python path at the ‘Custom python path’ field.
Selenium Script Converter Client – Provide custom python path, if necessary
  • Once, the ‘Select Selenium Script’ field is specified, the ‘Run’ button of the ‘Selenium Script Converter Client’ is enabled.
Selenium Script Converter Client – Run script
  • Click on the ‘Run’ button. The script execution begins. Once, the script execution begins, the ‘Pause’ and ‘Reset’ buttons of the ‘Selenium Script Converter Client’ are enabled.
  • To skip the recording of the script execution steps, the user can click the ‘Pause’ button. The ‘Pause’ button, then becomes the ‘Resume’ button, which is used to resume the recording.
Selenium Script Converter Client – Pause recording
  • To stop the recording of the script execution entirely and reset the fields of the Selenium Script Converter Client, the user can click the ‘Reset’ button.
Selenium Script Converter Client – Stop recording
Note: The ‘Pause’ and ‘Reset’ actions affect only the recording and do NOT affect the script execution.
8. Once the script execution is completed, on the ‘Selenium Script Converter’ landing page, click the ‘Stop Capturing’ button.
‘Selenium Script Converter’ Landing Page – After Script Execution Begins
9. To discard the recorded flow, the user can click the ‘Discard’ button. On discarding the recorded flow, the user will be redirected to the ‘Selenium Script Converter’ landing page.
‘Selenium Script Converter’ Landing Page – Discard after Capturing
10. To view the recorded flow, the user can click the ‘View Flow’ button.
‘Selenium Script Converter’ Landing Page – View flow after Capturing
11. The recorded flow will be displayed with the following sections:
  • Flow with screenshots – This is a sequenced flow of the recorded execution steps’ screenshots. Each screenshot will contain:
    • Highlighted object (if the action performed is on any object).
    • Action (if any action is performed on the highlighted object).
    • ‘Delete’ icon to delete the test step from the recorded flow.
View Flow Page – Flow with Screenshots
  • Additional Options – These options are with respect to the current recorded flow being viewed. The options available are:
    • Discard – To discard the recorded flow. On discarding the recorded flow, the user will be redirected to the ‘Selenium Script Converter’ landing page.
    • Confirm Data – On click of this, the user should provide a unique test case name for the recorded flow. This action is mandatory in order to enable the following options.
View Flow Page – Before Saving Flow as a Test Case
Note: The maximum character limit for a Test Case name is 20.
View Flow Page – Saving Test Case
View Flow Page – After Test Case is saved
  • ‘Export Assure Testcase’ – On click of this, the recorded flow will be downloaded as a JSON file, which can then be imported into any Avo Assure Test Case.
  • ‘Show Workflow’ – On click of this, a horizontal flow chart of the recorded test case(s) will be displayed. Refer here.
  • ‘Append Flow’ – On click of this, a pop-up is displayed with a ‘Stop Capturing’ button. Meanwhile, the user can run a different script which will be recorded. Once the script execution is completed, the user can click the ‘Stop Capturing’ button and save the newly recorded flow as another test case. In doing so, the previously recorded test case and the newly recorded test case can be merged into a workflow by using ‘Show Workflow’.

Show Workflow

This section displays the complete recorded flows as horizontal flow charts. Each path with a start and stop is considered as a scenario.
  1. 1.
    The recorded flow will be displayed as follows.
View Flow Page – Show Workflow
  • The nodes represented as parallelograms are the recorded test cases.
  • The Start node indicates the beginning of a scenario.
  • The End node indicates the end of a scenario.
2. The workspace can have multiple start and end notes which indicate a single module with multiple scenarios.
View Flow Page – Show Workflow with Multiple Scenarios
3. The nodes can be connected by performing a ‘drag and drop’ operation between the nodes to be connected.
4. The components of the flow: nodes and connectors can be deleted. The user can perform undo and redo operations on the changes made in the workflow by using the shortcut keys:
  • Ctrl+Z for undo operation.
  • Ctrl+Shift+Z for redo operation.
5. After performing the required changes in the workflow, the workflow can be exported as .sel files which can then be imported into Avo Assure. Refer section.
View Flow Page – Exporting Workflow
Note: If the user navigates to ‘Show Workflow’, they cannot return to the ‘View Flow’ screen to edit any recorded test cases.