Created
December 17, 2020 09:39
-
-
Save Munksgaard/dc8dd8af257cb133ec21cc60c905598a to your computer and use it in GitHub Desktop.
Selenium IDE script til at skifte password på KU "nok" gange til at man kan genbruge sit ønskede password.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "7d1d2484-7d78-44f2-8727-f53b1abd21a7", | |
"version": "2.0", | |
"name": "password skift", | |
"url": "https://id.ku.dk", | |
"tests": [{ | |
"id": "20076e95-0834-44c4-b99d-0a9caa35e30f", | |
"name": "ChangePassword1", | |
"commands": [{ | |
"id": "4e9c8a00-e0eb-4e13-bb23-1682c4652512", | |
"comment": "", | |
"command": "open", | |
"target": "/nidp/idff/sso?id=PasswordForm_SSPR&sid=2&option=credential&sid=2&target=https%3A%2F%2Fpassword.ku.dk%2Fsspr%2Fprivate%2F", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "d42a55fd-c326-4e90-a8be-748d7fbe4e80", | |
"comment": "", | |
"command": "type", | |
"target": "id=inputUsername", | |
"targets": [ | |
["id=inputUsername", "id"], | |
["name=Ecom_User_ID", "name"], | |
["css=#inputUsername", "css:finder"], | |
["xpath=//input[@id='inputUsername']", "xpath:attributes"], | |
["xpath=//input[3]", "xpath:position"] | |
], | |
"value": "DIT-KU-BRUGERNAVN" | |
}, { | |
"id": "496a9f4e-3d95-4c36-89e7-d648ed71bd0b", | |
"comment": "", | |
"command": "type", | |
"target": "id=inputPassword", | |
"targets": [ | |
["id=inputPassword", "id"], | |
["name=Ecom_Password", "name"], | |
["css=#inputPassword", "css:finder"], | |
["xpath=//input[@id='inputPassword']", "xpath:attributes"], | |
["xpath=//input[4]", "xpath:position"] | |
], | |
"value": "${old_password}" | |
}, { | |
"id": "d8e6be4f-c605-42dd-b49b-37786d68ef9e", | |
"comment": "", | |
"command": "sendKeys", | |
"target": "id=inputPassword", | |
"targets": [ | |
["id=inputPassword", "id"], | |
["name=Ecom_Password", "name"], | |
["css=#inputPassword", "css:finder"], | |
["xpath=//input[@id='inputPassword']", "xpath:attributes"], | |
["xpath=//input[4]", "xpath:position"] | |
], | |
"value": "${KEY_ENTER}" | |
}, { | |
"id": "232ae0c3-52c2-4626-84af-3dd5c6b3967b", | |
"comment": "", | |
"command": "click", | |
"target": "css=#button_ChangePassword .tile-title", | |
"targets": [ | |
["css=#button_ChangePassword .tile-title", "css:finder"], | |
["xpath=//a[@id='button_ChangePassword']/div/div/div[2]", "xpath:idRelative"], | |
["xpath=//a/div/div/div[2]", "xpath:position"] | |
], | |
"value": "" | |
}, { | |
"id": "e042ad9c-950f-4676-a7a5-d5fbc147a969", | |
"comment": "", | |
"command": "type", | |
"target": "id=password1", | |
"targets": [ | |
["id=password1", "id"], | |
["name=password1", "name"], | |
["css=#password1", "css:finder"], | |
["xpath=//input[@id='password1']", "xpath:attributes"], | |
["xpath=//form[@id='changePasswordForm']/table/tbody/tr/td/input", "xpath:idRelative"], | |
["xpath=//input", "xpath:position"] | |
], | |
"value": "${new_password}" | |
}, { | |
"id": "d6746cb3-3013-4b7c-bbe4-7f627b47c03f", | |
"comment": "", | |
"command": "click", | |
"target": "id=password2", | |
"targets": [ | |
["id=password2", "id"], | |
["name=password2", "name"], | |
["css=#password2", "css:finder"], | |
["xpath=//input[@id='password2']", "xpath:attributes"], | |
["xpath=//form[@id='changePasswordForm']/table/tbody/tr[2]/td/input", "xpath:idRelative"], | |
["xpath=//tr[2]/td/input", "xpath:position"] | |
], | |
"value": "" | |
}, { | |
"id": "6ab8543e-f5d4-4aa7-8cb6-e92990ac1118", | |
"comment": "", | |
"command": "type", | |
"target": "id=password2", | |
"targets": [ | |
["id=password2", "id"], | |
["name=password2", "name"], | |
["css=#password2", "css:finder"], | |
["xpath=//input[@id='password2']", "xpath:attributes"], | |
["xpath=//form[@id='changePasswordForm']/table/tbody/tr[2]/td/input", "xpath:idRelative"], | |
["xpath=//tr[2]/td/input", "xpath:position"] | |
], | |
"value": "${new_password}" | |
}, { | |
"id": "2b23ed2b-ec66-4e98-88d2-8aa786366a18", | |
"comment": "", | |
"command": "waitForElementEditable", | |
"target": "id=password_button", | |
"targets": [], | |
"value": "30000" | |
}, { | |
"id": "6cc9cebb-4982-45d4-980c-c73cb88cf638", | |
"comment": "", | |
"command": "click", | |
"target": "id=password_button", | |
"targets": [ | |
["id=password_button", "id"], | |
["name=change", "name"], | |
["css=#password_button", "css:finder"], | |
["xpath=//button[@id='password_button']", "xpath:attributes"], | |
["xpath=//form[@id='changePasswordForm']/div/button", "xpath:idRelative"], | |
["xpath=//button", "xpath:position"] | |
], | |
"value": "" | |
}, { | |
"id": "e15345c0-ae38-4514-bae3-c8aa0bd71d0c", | |
"comment": "", | |
"command": "click", | |
"target": "id=submitBtn", | |
"targets": [ | |
["id=submitBtn", "id"], | |
["name=button", "name"], | |
["css=#submitBtn", "css:finder"], | |
["xpath=//button[@id='submitBtn']", "xpath:attributes"], | |
["xpath=//div[@id='centerbody']/form/div/button", "xpath:idRelative"], | |
["xpath=//button", "xpath:position"] | |
], | |
"value": "" | |
}] | |
}, { | |
"id": "300b5f59-55ab-4dd3-9042-59a277693b99", | |
"name": "ChangePassword", | |
"commands": [{ | |
"id": "f777c437-aafd-4422-b00c-541f5fdf5bcb", | |
"comment": "", | |
"command": "store", | |
"target": "DIT-KU-PASSWORD", | |
"targets": [], | |
"value": "password" | |
}, { | |
"id": "380e0574-37eb-416a-ab48-4714c11b4494", | |
"comment": "", | |
"command": "store", | |
"target": "${password}", | |
"targets": [], | |
"value": "new_password" | |
}, { | |
"id": "3b5f045f-586e-402e-a700-8693654abdf8", | |
"comment": "", | |
"command": "store", | |
"target": "${password}", | |
"targets": [], | |
"value": "old_password" | |
}, { | |
"id": "3505ecac-72a9-4ace-a28a-2dbbbbf07d27", | |
"comment": "", | |
"command": "executeScript", | |
"target": "return 1", | |
"targets": [], | |
"value": "i" | |
}, { | |
"id": "2db2ae1c-5ec1-463a-9c03-95adaf5666cd", | |
"comment": "", | |
"command": "while", | |
"target": "${i} < 40", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "d43bb7f5-d0a7-439f-8d5d-7e501c06d2e9", | |
"comment": "", | |
"command": "store", | |
"target": "${new_password}_{i}", | |
"targets": [], | |
"value": "new_password" | |
}, { | |
"id": "4fbe7d95-63bd-4c6d-948a-8d17b98abf9b", | |
"comment": "", | |
"command": "echo", | |
"target": "End of loop ${i}. new_password is: ${new_password}. Old password is ${old_password}, password is ${password}", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "e7c242e5-6ebe-4f7c-b16b-350959d01369", | |
"comment": "", | |
"command": "run", | |
"target": "ChangePassword1", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "0fcabf58-afec-49a2-94ee-75117b0e94c5", | |
"comment": "", | |
"command": "store", | |
"target": "${new_password}", | |
"targets": [], | |
"value": "old_password" | |
}, { | |
"id": "fe0006b0-2417-4563-b10c-9f96a074f3e8", | |
"comment": "", | |
"command": "executeScript", | |
"target": "return ${i} + 1", | |
"targets": [], | |
"value": "i" | |
}, { | |
"id": "4028c453-43db-4077-a1cf-17fdb5476ea3", | |
"comment": "", | |
"command": "echo", | |
"target": "i: ${i}", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "8e5359a0-8ecc-485e-859f-12b84c77824c", | |
"comment": "", | |
"command": "end", | |
"target": "", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "9f8e47b2-6298-4474-861c-47544945e703", | |
"comment": "", | |
"command": "store", | |
"target": "${password}", | |
"targets": [], | |
"value": "new_password" | |
}, { | |
"id": "a8100409-79d0-4180-a256-74765ee1d146", | |
"comment": "", | |
"command": "run", | |
"target": "ChangePassword1", | |
"targets": [], | |
"value": "" | |
}, { | |
"id": "c94300a3-c06a-43a9-b955-3a4727c3d67c", | |
"comment": "", | |
"command": "", | |
"target": "", | |
"targets": [], | |
"value": "" | |
}] | |
}], | |
"suites": [{ | |
"id": "621479c8-d562-40c2-8d9a-2d53e21e472f", | |
"name": "Default Suite", | |
"persistSession": false, | |
"parallel": false, | |
"timeout": 300, | |
"tests": ["20076e95-0834-44c4-b99d-0a9caa35e30f"] | |
}], | |
"urls": ["https://id.ku.dk/"], | |
"plugins": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment