Shared accounts on web portals without a password-change API rarely have their password rotated, because no native automation exists for it. This includes third-party tools, legacy systems, and vendor portals. A Selenium template solves this by simulating in the browser the same interaction a person would perform manually.
Requirements
- Administrator access in Segura® Platform.
- A Selenium script (Python,
pytestformat) validated for the target site. - The account used on the target site must not have two-factor authentication (2FA) enabled.
Steps
- Prepare the script by replacing your application's web address and the IDs of the username, password, and button fields.
# Change to your web application's login address.
driver.get("https://portal.example.com/login")
driver.find_element(By.ID, "user").send_keys([#USERNAME#])
driver.find_element(By.ID, "password").send_keys([#CURRENT_PASSWORD#])
driver.find_element(By.ID, "login-button").click()
# Change to your web application's password change address.
driver.get("https://portal.example.com/password-change")
driver.find_element(By.ID, "current-password").send_keys([#CURRENT_PASSWORD#])
driver.find_element(By.ID, "new-password").send_keys([#NEW_PASSWORD#])
driver.find_element(By.ID, "confirm-password").send_keys([#NEW_PASSWORD#])
driver.find_element(By.ID, "save-password-button").click()
# Waits for validation of an element to verify that the change was successful
driver.find_element(By.CLASS_NAME, "password-change-success")
- In Segura® Platform, go to Executions > Template control > Templates.
- Click + Add.
- In Name *, enter an identifier for the template. For example: Password change - Vendor portal.
- In Executor *, select Selenium.
- In Execution type *, select Change password.
- In Content, paste the script prepared in step 1.
- Click Save.
Info
If the template approval flow is active, an approver must validate the template before it becomes available for use. Track the status in My requests.
Expected result
The template appears in the Templates list with the Selenium executor, ready to be used in a password-change execution.