Introduction
You can migrate your existing Selenium tests to Endtest. This process will convert those tests into standard Endtest codeless automated tests. It doesn’t matter if your existing Selenium tests are written in Java, Python, Ruby, C#, or any other programming language. The same process also works for any automated testing library or solution as long as you can execute those tests in a Chrome browser and you are able to load the Endtest Chrome Extension.How It Works
The Selenium migration uses our own Endtest Chrome Extension to record the steps from your existing Selenium tests. Instead of using it to manually record a test, you will load it directly into your existing Selenium tests. You just have to add a few steps at the start and at the end of your existing tests.- Start of Test:
- Automatically adds the Endtest Chrome Extension in the Chrome browser in which you are executing your Selenium tests.
- Logs in to the extension.
- Starts the recording process.
- End of Test:
- Stops the recording.
- Saves the recorded steps into a new test case on Endtest.
Instructions
You will need to add the following instructions to your existing Selenium tests:- Load the Endtest Chrome Extension in Your Test.
- Fetch the Dynamic URL for the Endtest Chrome Extension and Store It in a Variable.
- Log in to the Endtest Chrome Extension with Your Endtest Credentials.
- Enter the
Start from URL
for Your Test. - Click on the
Start Recording
Button. - Click on the
Stop Recording
Button. - Save Your Recorded Test into Your Endtest Account.
Section | Element | ID |
---|---|---|
Login | Email input | userEmailLoginInput |
Login | Password input | userPasswordLoginInput |
Login | Log In button | loginButton |
All | Settings icon | settings_icon |
Settings | Record Scroll Events checkbox | recordScrollEventsCheckbox |
Settings | Record Hover Events checkbox | recordHoverEventsCheckbox |
Settings | Don’t use the “id” attribute checkbox | doNotUseIdAttribute |
Settings | Don’t use the “name” attribute checkbox | doNotUseNameAttribute |
Settings | Don’t use URL query strings checkbox | doNotUseUrlQueryStrings |
Settings | Ignore classes textarea | blacklist_classes |
Settings | Custom data attributes textarea | custom_data_attributes |
Settings | Done button | done_button |
Before recording | Start from URL radio button | startFromUrlRadio |
Before recording | Start from here radio button | startFromHereRadio |
Before recording | URL input | urlInput |
Before recording | Start Recording button | startRecordingButton |
During recording | Pause Recording button | pauseRecordingButton |
During recording | Stop Recording button | stopRecordingButton |
During recording | Take Screenshot button | takeScreenshotButton |
During recording | Add Assertion button | addAssertionButton |
After recording | Test Case Name input | testCaseNameInput |
After recording | Existing Test Suite radio button | existingTestSuiteRadio |
After recording | New Test Suite radio button | newTestSuiteRadio |
After recording | Test Suite Name input | newTestSuiteName |
After recording | Choose Test Suite select | selectTestSuite |
After recording | Save button | saveRecordingButton |
After recording | Cancel button | cancelRecordingButton |
Example
Let’s take a look at an example for migrating an existing Selenium test written in Python.Original Selenium Python Code
- Load the Endtest Chrome Extension ZIP file in the Chrome browser from the test.
- Enter your Endtest credentials in the Endtest Chrome Extension.
- Enter the starting URL for your test.
- Click on the
Start Recording
button.
popup.html
page from the Endtest Chrome Extension will be automatically loaded.
The URL for that page is dynamic and will be different for each test execution.
