22850 lines
755 KiB
Plaintext
22850 lines
755 KiB
Plaintext
{
|
||
"id": "33c8862c-14bd-405e-882f-5b3a904a2e90",
|
||
"version": "2.0",
|
||
"name": "paheko",
|
||
"url": "http://test.paheko.localhost/",
|
||
"tests": [{
|
||
"id": "b3fdeef5-2f6f-46e8-a9db-5995bbf94957",
|
||
"name": "1-01 installation",
|
||
"commands": [{
|
||
"id": "61bab7ef-9d04-40de-8b87-98999729b832",
|
||
"comment": "Page installation",
|
||
"command": "open",
|
||
"target": "/admin/install.php?__reset_test",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "71275c7f-557e-4df3-8cea-df31739292c6",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fe3f8eb9-deb5-4c83-8a0f-4959dc795db9",
|
||
"comment": "Liste pays",
|
||
"command": "click",
|
||
"target": "id=f_country",
|
||
"targets": [
|
||
["id=f_country", "id"],
|
||
["name=country", "name"],
|
||
["css=#f_country", "css:finder"],
|
||
["xpath=//select[@id='f_country']", "xpath:attributes"],
|
||
["xpath=//select", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1616fb13-8f21-42df-85a1-02c9438654cd",
|
||
"comment": "France",
|
||
"command": "click",
|
||
"target": "css=option:nth-child(2)",
|
||
"targets": [
|
||
["css=option:nth-child(2)", "css:finder"],
|
||
["xpath=//option[@value='FR']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_country']/option[2]", "xpath:idRelative"],
|
||
["xpath=//option[2]", "xpath:position"],
|
||
["xpath=//option[contains(.,'France')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "5e44cad4-268c-4953-a40d-6e72a99c28ec",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "id=f_name",
|
||
"targets": [
|
||
["id=f_name", "id"],
|
||
["name=name", "name"],
|
||
["css=#f_name", "css:finder"],
|
||
["xpath=//input[@id='f_name']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3e9d9317-5b89-4af3-bc6b-d1408beaf235",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "Cassiopée",
|
||
"targets": [],
|
||
"value": "nom_asso"
|
||
}, {
|
||
"id": "a6ebba35-2e98-46d1-8733-f46c696aab48",
|
||
"comment": "Nom de l'asso",
|
||
"command": "type",
|
||
"target": "id=f_name",
|
||
"targets": [
|
||
["id=f_name", "id"],
|
||
["name=name", "name"],
|
||
["css=#f_name", "css:finder"],
|
||
["xpath=//input[@id='f_name']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nom_asso}"
|
||
}, {
|
||
"id": "7f6615a1-b7a9-4a61-be99-2118c6efe3bf",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "id=f_user_name",
|
||
"targets": [
|
||
["id=f_user_name", "id"],
|
||
["name=user_name", "name"],
|
||
["css=#f_user_name", "css:finder"],
|
||
["xpath=//input[@id='f_user_name']", "xpath:attributes"],
|
||
["xpath=//fieldset[2]/dl/dd/input", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "c9801d83-4da1-4895-a3a6-9bb2de318da8",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "Lambert Paul",
|
||
"targets": [],
|
||
"value": "nom_admin"
|
||
}, {
|
||
"id": "61706b69-8a95-4f55-b53e-79eb8317f5e8",
|
||
"comment": "Nom premier membre",
|
||
"command": "type",
|
||
"target": "id=f_user_name",
|
||
"targets": [
|
||
["id=f_user_name", "id"],
|
||
["name=user_name", "name"],
|
||
["css=#f_user_name", "css:finder"],
|
||
["xpath=//input[@id='f_user_name']", "xpath:attributes"],
|
||
["xpath=//fieldset[2]/dl/dd/input", "xpath:position"]
|
||
],
|
||
"value": "${nom_admin}"
|
||
}, {
|
||
"id": "0bc0fe40-75cc-4ac3-be1f-3f97b9325194",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "jckix@free.fr",
|
||
"targets": [],
|
||
"value": "courriel_admin"
|
||
}, {
|
||
"id": "697ca21a-79b7-4138-9e21-e6f00a28321d",
|
||
"comment": "Adresse courriel",
|
||
"command": "type",
|
||
"target": "id=f_user_email",
|
||
"targets": [
|
||
["id=f_user_email", "id"],
|
||
["name=user_email", "name"],
|
||
["css=#f_user_email", "css:finder"],
|
||
["xpath=//input[@id='f_user_email']", "xpath:attributes"],
|
||
["xpath=//dd[2]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel_admin}"
|
||
}, {
|
||
"id": "0bb8f2ed-f15d-45f8-bfa7-545612b85893",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "css=input:nth-child(2)",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Copier']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "aa08301f-53d7-4fa4-92e2-5dd1cb6224ae",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "interpeller noircir colis allumer",
|
||
"targets": [],
|
||
"value": "mdp_admin"
|
||
}, {
|
||
"id": "9c99910e-2797-4608-b056-52018171ed7f",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "id=f_password",
|
||
"targets": [
|
||
["id=f_password", "id"],
|
||
["name=password", "name"],
|
||
["css=#f_password", "css:finder"],
|
||
["xpath=//input[@id='f_password']", "xpath:attributes"],
|
||
["xpath=//dl[2]/dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "43f025a8-6dd0-4f60-9484-0069c6e19c3b",
|
||
"comment": "Mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [
|
||
["id=f_password", "id"],
|
||
["name=password", "name"],
|
||
["css=#f_password", "css:finder"],
|
||
["xpath=//input[@id='f_password']", "xpath:attributes"],
|
||
["xpath=//dl[2]/dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${mdp_admin}"
|
||
}, {
|
||
"id": "86d5dff6-1cd7-4ac2-a8f5-885f9ed6c6d5",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "id=f_password_confirmed",
|
||
"targets": [
|
||
["id=f_password_confirmed", "id"],
|
||
["name=password_confirmed", "name"],
|
||
["css=#f_password_confirmed", "css:finder"],
|
||
["xpath=//input[@id='f_password_confirmed']", "xpath:attributes"],
|
||
["xpath=//dd[5]/input", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "69e59788-0f98-46b1-8362-39f979b44073",
|
||
"comment": "Mot de passe (bis)",
|
||
"command": "type",
|
||
"target": "id=f_password_confirmed",
|
||
"targets": [
|
||
["id=f_password_confirmed", "id"],
|
||
["name=password_confirmed", "name"],
|
||
["css=#f_password_confirmed", "css:finder"],
|
||
["xpath=//input[@id='f_password_confirmed']", "xpath:attributes"],
|
||
["xpath=//dd[5]/input", "xpath:position"]
|
||
],
|
||
"value": "${mdp_admin}"
|
||
}, {
|
||
"id": "f9af3a0d-0d68-44a9-ad9d-a603cf45f9cb",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Commencer à gérer mon association')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8bdb6048-f614-4e87-ad22-fb451fa8c225",
|
||
"comment": "Menu Configuration",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/config')]",
|
||
"targets": [
|
||
["css=li:nth-child(6) b", "css:finder"],
|
||
["xpath=//li[6]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Configuration')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "18965af9-b3ad-4b6b-85a1-c924b283fb1d",
|
||
"comment": "Nom de l'asso",
|
||
"command": "assertValue",
|
||
"target": "id=f_org_name",
|
||
"targets": [],
|
||
"value": "${nom_asso}"
|
||
}, {
|
||
"id": "6d51ef7f-5a72-490c-a636-aa8c4126a719",
|
||
"comment": "Adresse e-mail de contact",
|
||
"command": "assertValue",
|
||
"target": "id=f_org_email",
|
||
"targets": [],
|
||
"value": "${courriel_admin}"
|
||
}, {
|
||
"id": "0d10eb36-b5d6-4004-8272-e03fe4e6647e",
|
||
"comment": "Pays",
|
||
"command": "assertSelectedLabel",
|
||
"target": "id=f_country",
|
||
"targets": [],
|
||
"value": "France"
|
||
}, {
|
||
"id": "65740c53-7195-40a2-8829-0549149244af",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=li:nth-child(2) b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b6df3153-03ec-4b6e-92fb-80077dcd6d40",
|
||
"comment": "Nom premier membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/th//span",
|
||
"targets": [],
|
||
"value": "${nom_admin}"
|
||
}, {
|
||
"id": "44fc6c36-f8b6-457c-a3ef-01d968672885",
|
||
"comment": "Bouton Fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//span[contains(.,'Fiche membre')]",
|
||
"targets": [
|
||
["css=.actions > .icn-btn:nth-child(1) > span", "css:finder"],
|
||
["xpath=//tbody/tr/td[4]/a/span", "xpath:position"],
|
||
["xpath=//span[contains(.,'Fiche membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "5f6a5b2b-501d-4e56-b8df-cb35005b3255",
|
||
"comment": "Numéro de membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "1"
|
||
}, {
|
||
"id": "33022e6f-811b-4192-9180-0a99f3243855",
|
||
"comment": "Nom et prénom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom_admin}"
|
||
}, {
|
||
"id": "64e9103a-370c-4737-9882-685d7feaf552",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel_admin}"
|
||
}, {
|
||
"id": "4db2876d-616f-4c1b-b02a-98228dc23225",
|
||
"comment": "Catégorie du membre",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "b414fd1f-9102-4f9c-9466-3565b745d1a5",
|
||
"comment": "Vérifier catégorie",
|
||
"command": "assert",
|
||
"target": "categorie",
|
||
"targets": [],
|
||
"value": "Administrateurs"
|
||
}]
|
||
}, {
|
||
"id": "b468a6eb-1199-460a-95f8-820df1f2c2f9",
|
||
"name": "1-01a installation échec",
|
||
"commands": [{
|
||
"id": "fd5b9d86-7bfa-46ba-a15d-bce85f1441bb",
|
||
"comment": "Page installation",
|
||
"command": "open",
|
||
"target": "/admin/install.php",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f653a356-df0c-4ec6-86a4-0a67e290fa6c",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e005004f-2832-422b-8e57-f3990ed3ec3b",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//p[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "d6791401-e683-4d44-9513-24c52f1c6517",
|
||
"name": "1-02 vérif 1er membre",
|
||
"commands": [{
|
||
"id": "992c77f4-75bc-4088-bcd9-331061c0b221",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a61e7b27-e911-44a7-9c0a-abc030b9a4e1",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ab795561-bb95-49b5-8f1d-349fc94639fe",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "a447d087-f8b2-4b38-a421-80ac394cb2dc",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "45323dd1-34c7-4aaa-9c11-70e0e34cb7b5",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "531ed78b-af27-4299-86ee-282277904118",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "d88c7f2f-2542-4372-a75e-fb57c2b82f95",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "13ebff0e-a939-4ee0-b2f4-ecde90b63440",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "01fba9c8-9062-4044-bfbc-6b8bcb101e1b",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=li:nth-child(2) span", "css:finder"],
|
||
["xpath=//li[2]/h3/a/span", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "7c6a4d16-05fe-4bb7-901e-72b5e41d486d",
|
||
"comment": "Fiche 1er membre",
|
||
"command": "click",
|
||
"target": "xpath=//span[contains(.,'Fiche membre')]",
|
||
"targets": [
|
||
["css=.actions > .icn-btn:nth-child(1) > span", "css:finder"],
|
||
["xpath=//tbody/tr/td[4]/a/span", "xpath:position"],
|
||
["xpath=//span[contains(.,'Fiche membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "26b9a995-9c09-46ab-b733-65bbb238eae3",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "1"
|
||
}, {
|
||
"id": "3b461e26-0b8d-41ce-93b5-e34892ef7a0c",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Lambert Paul"
|
||
}, {
|
||
"id": "556f6757-8033-4979-9686-5d5bac639f2c",
|
||
"comment": "Vérif e-mail",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "0d567127-5cb6-447a-89ae-fa31a513ff9d",
|
||
"comment": "Catégorie du membre",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "d3804084-f0dc-4a3a-aa5b-670dfdfefe6e",
|
||
"comment": "Vérifier catégorie",
|
||
"command": "assert",
|
||
"target": "categorie",
|
||
"targets": [],
|
||
"value": "Administrateurs"
|
||
}]
|
||
}, {
|
||
"id": "0849fbc2-a4f9-48a5-8698-afec02eb558f",
|
||
"name": "2-01 connexion correct",
|
||
"commands": [{
|
||
"id": "7bbc53e7-fe56-460a-a7a6-e9139c354956",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/login.php",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f06a2714-73cb-40d3-88a4-9779f977ecdc",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "6f50359e-db5d-480b-9b33-23f50da83664",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "68572e57-230b-4188-a46f-714314a53e11",
|
||
"comment": "Déconnexion",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "32c741d3-d2f5-4b81-b906-2c11c554d2d4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6b84d76c-92d6-4eb3-b94b-f6da2b7608dc",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f7fa777f-fd29-4f0e-ba56-86fef62e6006",
|
||
"comment": "identifiant connexion",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [
|
||
["id=f_id", "id"],
|
||
["name=id", "name"],
|
||
["css=#f_id", "css:finder"],
|
||
["xpath=//input[@id='f_id']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "53b19364-7089-453c-8ccb-5520bb327dfd",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [
|
||
["id=f_password", "id"],
|
||
["name=password", "name"],
|
||
["css=#f_password", "css:finder"],
|
||
["xpath=//input[@id='f_password']", "xpath:attributes"],
|
||
["xpath=//dd[2]/input", "xpath:position"]
|
||
],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "7c9c73bd-21d6-4493-8281-07e86b662a59",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [
|
||
["name=login", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='login']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Se connecter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a0b40845-f16e-4a92-bb91-9c051c47b07b",
|
||
"comment": "Pas d'erreur ?",
|
||
"command": "assertElementNotPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "67e8d492-998e-4cce-aabb-5635a7f08ed0",
|
||
"comment": "Bonjour",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//h1[contains(text(), \"Bonjour\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "87aa0ef5-bb8c-496d-a196-0f92278e98b1",
|
||
"name": "2-02 connexion échec identifiant",
|
||
"commands": [{
|
||
"id": "5a8e495b-987a-4099-b397-70c9650e111a",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/login.php",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "db829ee6-696b-4d70-840d-bb79282e5b2d",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "5be6f2f3-5435-4462-b7a1-3e2a2b09f50f",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "656ae9a9-cc40-463a-9f4d-2529d4f502d4",
|
||
"comment": "Déconnexion",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "be452c2a-8050-4054-a04e-5486ef12bc6b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e969ce2e-9cb5-47a4-a8fc-476fb67ba4f9",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d4e49a22-2897-459f-9169-2d1e6adbe0df",
|
||
"comment": "identifiant connexion",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [
|
||
["id=f_id", "id"],
|
||
["name=id", "name"],
|
||
["css=#f_id", "css:finder"],
|
||
["xpath=//input[@id='f_id']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "polo@free.fr"
|
||
}, {
|
||
"id": "ab9f41ed-6165-4b4c-b24a-2f4a505f86cf",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [
|
||
["id=f_password", "id"],
|
||
["name=password", "name"],
|
||
["css=#f_password", "css:finder"],
|
||
["xpath=//input[@id='f_password']", "xpath:attributes"],
|
||
["xpath=//dd[2]/input", "xpath:position"]
|
||
],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "8dc91265-cc24-4929-8bf8-9811f04095eb",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [
|
||
["name=login", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='login']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Se connecter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "63ae88e9-f6a2-4bcf-8d13-5a4c5d8a1897",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "c36d64ef-b5db-4c15-90aa-204431553d05",
|
||
"name": "2-03 connexion échec mdp",
|
||
"commands": [{
|
||
"id": "d63f59cc-7b13-416c-ac4e-5520b4f5e299",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/login.php",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "65fd69db-b2db-4395-8140-6fd98d80b662",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "7168cad3-9c41-43f9-b7d4-29b70499346d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "da322f69-7807-4d72-a4a2-b3a0ee786176",
|
||
"comment": "Déconnexion",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ff329f14-631f-4461-851b-1632e731bffd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "23420ae0-2de1-4fde-a7a4-d4965a203d0e",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9c144216-af36-4843-a761-d73fbdaa9e90",
|
||
"comment": "identifiant connexion",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [
|
||
["id=f_id", "id"],
|
||
["name=id", "name"],
|
||
["css=#f_id", "css:finder"],
|
||
["xpath=//input[@id='f_id']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "73a8add8-f646-47a4-8de1-20099832c251",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [
|
||
["id=f_password", "id"],
|
||
["name=password", "name"],
|
||
["css=#f_password", "css:finder"],
|
||
["xpath=//input[@id='f_password']", "xpath:attributes"],
|
||
["xpath=//dd[2]/input", "xpath:position"]
|
||
],
|
||
"value": "xxx"
|
||
}, {
|
||
"id": "4eb7de55-7b4a-41ab-b16c-5b1e4838c0cf",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [
|
||
["name=login", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='login']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Se connecter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "2072df70-2639-48a2-8b4d-00e6e42d0812",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "efad291c-7700-4c1d-a0c7-393264364aa1",
|
||
"name": "3-01 créer membre simple",
|
||
"commands": [{
|
||
"id": "b14ce7cc-11db-4a3b-bfbf-12ec4765eeeb",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74f82a04-3947-4f4a-9990-924324a08f6e",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "c52c2703-b6f7-4988-9903-9e7f5eae7ccd",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3f9393ee-6b4f-4b3d-a846-770cf3a2043f",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "d4cca7c7-3bab-4099-8f0c-5a0447e6ace8",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "fb388499-5851-4b7e-b22d-8e7256159d62",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e5e6b042-3da1-462b-a315-2ec15973bc67",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "89c0f0f6-2d9c-459f-846e-a78946f5905a",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4d1a1742-d8e9-4481-a97a-eeea7d5c70f7",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "ad938cad-27c2-4945-a24b-e3b40ec90c74",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4348c18a-7fb2-4ab6-b429-e3beb3c052c0",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "0abd1709-be5d-4042-81f0-93700b43c1f8",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "5d8bb54b-1be1-44ab-902e-124fe9819cc0",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "95b41cf8-950a-4157-8bbd-5e8959fb4230",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "44c5177c-dce7-4702-a31a-08b791368b0a",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "8051aed2-39c2-48a7-8d00-101f9d26a508",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "c0d7b692-3a8f-408d-8b0e-4ec4385cfae3",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "beb2f78b-8a2a-4e7d-bb48-772c5ade5b49",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8dc7d09d-1019-4987-91c3-1fd882700650",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "786b3eab-e51b-46ca-a9f7-b5f0a46ed43b",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "91cb43db-cac3-4d72-b364-6e912697b71a",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "372ef039-8e00-46d1-b6d6-e14a9e1a0a2a",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "84552c91-deed-4d0f-aae1-8933597eec1d",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "389a2d01-5eac-4590-9358-87e741da1b99",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "e8255b4f-3597-4d55-b32e-277b081c8a8b",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "41e693e8-4f2e-44ce-ab5f-6396217d89d5",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "de8dae66-cbd2-46db-af11-798dfe544d96",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5d054771-d040-43f6-b91c-33969b7c2947",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "99c18ac1-66f3-4133-944b-519254ae277c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8ee205d2-b206-4407-b6cb-bc07eb3ad40c",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "46e2408d-9a9f-4c62-80ce-3cfa08c33e62",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "328116f9-cef6-4508-a26c-62789787c2d1",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "af297835-cb69-4675-a63b-3df85c8b2ab5",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "85367a29-1f35-493b-8172-161dd625c5c1",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "fa560762-3b6c-4f64-a0ce-4f92805a5503",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "f26e25ab-c200-4a13-b350-000781f1b781",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "77fa9b84-b444-4ab3-a220-b9b98866286c",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "d1bacf54-ff6c-45cb-9f40-2a91f90360e7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "4d4515b8-c135-4cbd-a1bc-12562e1f9f35",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "e18777ad-f909-4898-92dc-e48733dbf8a4",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "26026b3b-602f-4cda-b57d-89aa834d5c9a",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c1e4769a-c485-45ee-aa79-0c2a317b36a6",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "c743f7d1-bfd0-4b91-95c9-c61a1807e839",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f5d093a4-7d04-4751-a695-f2cd4b270ca1",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "782f3943-b137-49bc-8178-ea9b8923282b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "37a555eb-1147-4375-ad85-7fd52d37792e",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "542187b1-45cd-4f09-bad6-b1220fbfc754",
|
||
"name": "3-03 créer membre catégorie ancien",
|
||
"commands": [{
|
||
"id": "a8bc6b39-fd0c-4bd0-ac5c-5c6de1e7973b",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9a2b2d5f-8aa4-46f6-98af-11f060699459",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "5b205564-f777-4ad1-abfd-a8492d906f45",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a66e1002-12f4-4f65-a21a-1af67f0ce8f0",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "eb7cbe6a-128b-463f-a2e0-18d36fe1c0e2",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "21765375-4b9a-49ab-81f1-5dfa33434ceb",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5ba9ea26-6ced-4595-831d-869e11ab2cf6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2016dc21-0e94-4464-a2aa-aa6fba171702",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a3d96f44-f1b6-4cb0-b575-9a577ad3e0fc",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Anciens membres",
|
||
"targets": [],
|
||
"value": "cat_membre"
|
||
}, {
|
||
"id": "70a188d0-500f-4e7f-b4cc-b729d8b14b49",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "a19c958f-5619-4721-b532-97af4b24ab96",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "3d52af5d-6637-4424-8179-e7b1a10bf24b",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "93a82799-df8c-43db-8d27-a3b04662fc8c",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "7ce7e1eb-4892-4296-bc86-e71031b8b2a4",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "1056a2ee-4e5a-4bf4-a1c0-2155b00af5e4",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "9e76f500-d05e-4f67-93b6-a9064c7d1ff8",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "9e64999d-9bee-4b7d-aa2d-4da11d50817f",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "f0cef9ba-c0f3-46f1-8bff-0fa9674d0b40",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "2fc843d2-be98-4426-9433-3f3458f97e2a",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "c4e38f50-5403-4d2c-9b3e-ab40ef48f1f5",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat_membre}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "2c0e46de-b4d3-4bc0-91d2-673d0c5a623e",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "fd75ac9e-66a0-4413-b94e-0242112d8f57",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "ba793090-3027-4217-875b-f3209ece7a9b",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "e718fcad-6dc4-42d4-a20d-34603e88fd5a",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "d5e3c0ba-3f4e-4b21-abc4-2268d2acc6cc",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "1ac5dc35-ca1c-4426-8569-ad17e4f0a7e3",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "0120e17a-437a-44b3-ba96-bef536372503",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ca16f01a-365e-4c10-8036-257b209fe1ba",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "20e796aa-55fc-40e1-91e5-d0843786b263",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0cc12d6f-b5c9-4c6f-ae13-bfa420a0f54e",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "f45dec33-a4c2-4cdc-83fc-dcf48e22fd87",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ec1dc916-aedb-4b23-8a61-fcbbe6d7fa65",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "0c720acd-08ac-4b80-9569-fcb1ff4f9687",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "897fcf68-a122-487c-a4bb-beea5bcb0a42",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "57d9e90b-4e62-44cb-88b6-240cc937cbb7",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "732b550b-713a-4d71-ac8e-b39cd8b5f7e3",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "0f769f80-11a5-4931-97f6-ee48ede02ac2",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "bed84971-ddff-4b27-af87-5c710f8df251",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "8d8f01b0-e669-47c4-8e45-2ee0e7d4910e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "c45e4383-5d3e-4173-9a3e-1ce04fd8f7fe",
|
||
"comment": "vérif téléphone",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "44961419-af5c-4064-96fa-e50f350a7429",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4804b34c-68b0-41aa-898b-98ae271b8ca8",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "2668188e-680f-4276-83b8-2a6294c4b310",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a6e1e0d-d5d5-4c4a-b56f-d9f0418b9e84",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "76f9bf91-fc1c-460c-8db7-a7ac0dc68858",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d760d487-3e61-4030-96f7-4c889d1e6df3",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "004fbb35-316a-473f-aa0d-bb51351e3efb",
|
||
"comment": "Catégorie du membre",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "8f38b4e2-2804-4ebf-8f6e-1de6edf09412",
|
||
"comment": "Vérifier catégorie",
|
||
"command": "assert",
|
||
"target": "categorie",
|
||
"targets": [],
|
||
"value": "${cat_membre}"
|
||
}]
|
||
}, {
|
||
"id": "efb8a434-ee82-48e0-a770-d4a668e28eec",
|
||
"name": "3-04 créer membre Inscrit lettre",
|
||
"commands": [{
|
||
"id": "65ccf874-7ebe-4aa7-be36-d2361e2f041c",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "965f8db1-1ccc-49dc-8077-ca3f8288f472",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "661aed0a-884e-4eef-be1f-9a5a89cc29f3",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "873a1b1b-26cc-4313-b38f-e79e4a44f608",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "71b05198-73ab-44aa-a97f-49992ba43368",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "ef68cf00-5d1a-41df-8b10-2c48d63fa1a4",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0ad26f7f-f3a5-447a-ac2d-6a0c11af16b6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d78d5e9e-c89c-4bee-895e-3759d24d9858",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "47d22a7d-8aae-45be-a9bd-824475be6756",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "691ecfcc-24d0-434d-bfea-3ea059e05680",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ad21c34b-9929-471a-bea5-af7deff62c26",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@ailleurs.fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "009a0309-b962-49fb-b5f6-bb67e9d84443",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "3 rue des vagues",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "680d7ee1-aa80-48e3-a37a-a16386e2d63d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "79323d74-2df4-41ef-910b-5a96fbe1035c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "98d2dc19-3680-41c4-8fdb-a81167927ef2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "927c3533-0896-4cdf-95e0-61cfc72d39c8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return true",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "c5a70e2b-3ac7-4a4f-b099-0c55ea3b3f36",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "03/03/2023",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "f19d24bc-fb8f-4ef2-88cb-a9c8fe423310",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3e9cde50-321a-4d61-9439-65b56a1c0005",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "ea8da6bc-e080-4b5e-bc6f-7ad41d8efe6d",
|
||
"comment": "Catégorie",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "6cb02725-9dcb-4aea-998f-52540487b1c5",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "88c0c06e-54b9-4da2-bbc3-76bc14d82f3e",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "1376637c-6418-4a61-80e3-3bc88e08ed89",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "7d5e5ea1-09c1-489e-8174-5634f51f2e09",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "b62857cd-f7cd-4feb-8c5e-e98e8bc0236d",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "910538f3-4c2f-4072-b2df-c5f6ddd60463",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "fa4683ba-1af7-4775-b044-07d3cc4d41b0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9fcdd36c-23d3-424a-909e-9de3f62ccb39",
|
||
"comment": "Inscription lettre info",
|
||
"command": "check",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f933ed8c-fce5-4edf-a19c-53af6a1f22ea",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bbf1ff6b-887e-40da-acce-e9d7f1167995",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "9ce84e89-38f3-4835-a773-e5c3dcd2fb1d",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "72b3f608-6788-449c-a841-cf5ab43b4455",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "a9a663f7-286f-4202-aa7b-402188459f70",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "09dfe60c-4593-4e76-92c0-d738ff7ce220",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "3aea85a1-f5d6-48cd-a4df-0e0cd5e14a72",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "56aa6e82-5925-46d2-8817-8fab68ced661",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "caccfb3f-a54f-45e6-b4b0-0d03df713f44",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "36a87f3a-cc93-4722-84ee-dbeb3fc72557",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "4864681b-fbe1-481e-b41a-519331ff10bf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "5bb863af-dcd1-4486-9934-a389e40bfae8",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "2f93b0b3-8621-4015-8142-13682c7ffe2f",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7be4c4ee-27f8-4558-883b-740247bc3db0",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "fd2ba9ed-a620-4e7b-9fde-5217bc4e77b3",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "47218bc2-e094-4b01-bb03-27eef5ed5005",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "fd4c321a-ec5c-4073-a7c6-cf1c37a9eecd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fe919632-25c1-44bd-a554-855ab13154e1",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "71fe09f0-51bb-4d2f-8c66-91ec5e235105",
|
||
"name": "3-05 créer membre date bizarre",
|
||
"commands": [{
|
||
"id": "32553fb9-6558-466f-90c0-31471c43187e",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a190edd-637a-4f52-94cc-25ae3f84b8b9",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "54e94108-5ead-496d-9607-c44adb4f272a",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "409faadb-00e7-4a63-bf4c-a215d21c66ed",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "874a6349-1535-4a98-9db2-bd7b31649af4",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "fc48899a-134c-4874-b53c-2e2dcce9d339",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f9616679-abfb-4ea1-aa19-f91fb7d7aea9",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "481d5dd0-ef2a-4329-85a4-b76412b01a98",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "70c0c835-6920-4bdf-9eec-6a1dd1e90a6c",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "07b86442-7ea1-457a-b517-0dd4710f5743",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4756e0f7-7435-4269-b2d9-4d0578a248bc",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "5896a2ab-c2f0-4a1f-b6c8-2bfa024e835f",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "a7b6db66-a516-4744-b8ed-e6bca89fdf62",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "49db377e-0fad-4b10-8a6e-8cf4f087f98a",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "e739c2a5-d60f-4af7-b6e7-a4c24189eb49",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "c478a9ed-2317-4272-bb80-c6ebcdc6dffc",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "1f654505-cd0e-45cb-8e9e-74df1afb61cb",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "95/31/2020",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "78670de0-b279-4e37-ac87-f837ece72faa",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "03b93d25-c1d3-43e8-b9ed-ac763565dd72",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "0d2a4755-db45-4773-8ed2-d8d57b9c4b75",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "4f00e4dd-d9d9-474f-b3b7-e9afd63b4680",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "1ddfe1a4-2c08-4562-9fd7-270d6ba33861",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "8521c5bd-a29a-4688-8217-bc2877757382",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "5a306c9d-f979-4c35-b2e9-1153664fb67d",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "65e39991-4968-40fe-ae84-a5c5e0a68e4a",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "c2bfc3e3-6ca8-424b-8dc8-4f1df61d00cf",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "7b61142a-69da-47f3-96cc-6eb7ad6b904f",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fdbb47ab-7aeb-42e7-a9c1-875003eb071d",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b2545c4e-8b48-4002-8f32-e49289285669",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5776a36d-28b7-45e5-a923-24f26a42631b",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "26000250-ebb2-422a-b0b2-49503bfdfa39",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f77af470-496f-43e2-bd30-539109685105",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "c9005e28-4d5c-401e-b299-18c916e4cd27",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "b4b51d1a-509b-4851-9529-3981dd3a8c8a",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "1d5966a8-b875-48fd-b56f-ee2c9ae23d8a",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "2cf267c8-49b4-4769-9830-485f5a241ecf",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "f78944db-fb67-4791-ab65-5d73faef62e2",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "1d279688-a9d5-4164-8e8a-fb31e354712f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "1b131ce0-3f25-4962-af3b-ec5d92864bbf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "c6a16bc9-3393-4282-9a95-f08d155324f6",
|
||
"comment": "Vérif téléphone",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "1cf499d7-0026-4074-abb5-850efd958e04",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6cfdeb15-0085-436d-ac26-b15577d40cf0",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "8af9eb6b-6972-480d-a199-e61664a01f0f",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7373abb6-1b87-42ad-bc96-cc524230e224",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "d46f966f-dec0-4956-98ea-400660f9a947",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e383f517-b5ae-4cdf-83c6-66ab5d0b1ede",
|
||
"comment": "Vérif date inscription",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "date_affichee"
|
||
}, {
|
||
"id": "8734fa90-92e3-42ae-9a19-9b5f407f8eeb",
|
||
"comment": "Calcul date réelle",
|
||
"command": "executeScript",
|
||
"target": "function joursMois (annee, mois) { return new Date(annee, mois, 0).getDate(); } function getDate(chaine) { var ds = chaine.split('/'); var jour=ds[0]; var an = Math.floor(ds[1]/12); var annee = Number(ds[2]) + an; var mois = ds[1] - 12 * an; var dm = joursMois(annee, mois); while (jour > dm) { jour -= dm; ++mois; if (mois > 12) { mois = 1; ++annee; } dm = joursMois(annee, mois); } if (jour < 10) { jour = '0' + jour; } if (mois < 10) { mois = '0' + mois; } return(jour + '/' + mois + '/' + annee); } return getDate(${date});",
|
||
"targets": [],
|
||
"value": "date_calculee"
|
||
}, {
|
||
"id": "54ccfc65-eec8-492e-a6ed-5a085a493022",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "date_calculee",
|
||
"targets": [],
|
||
"value": "${date_affichee}"
|
||
}]
|
||
}, {
|
||
"id": "895513b5-888a-4ea2-8036-5a97569cd6df",
|
||
"name": "3-06a créer membre rattaché choix unique",
|
||
"commands": [{
|
||
"id": "fadb5d39-1907-417b-9d02-79547c3dc04a",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3cf5a905-7576-4cd1-97a5-a6d532691208",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "a30539dd-0977-463a-b842-cb10e7349fc0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2def971c-6153-4e19-9c7e-f99232413cae",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "c8a19e64-7093-4477-ad3b-bf290d6faf72",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "7369fff8-a63c-4b59-aa2b-bc1e13782c5f",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ccef399a-525f-4b3e-910c-a861db874cfd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0e239b08-1665-403a-bd19-4dc43eff8724",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2e55f3c0-92f8-4a63-809d-09a50020293c",
|
||
"comment": "Créer un responsable",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b7ea4b6b-3795-4b4c-bb31-9861eb8b5713",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "0211dfaa-ccb5-4536-b195-8dc03b5eefee",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero_responsable"
|
||
}, {
|
||
"id": "bd826a05-76cb-4b8d-800a-13e7eca77baf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom_responsable"
|
||
}, {
|
||
"id": "3e994625-eb50-484e-b032-364afba627f3",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [],
|
||
"value": "${nom_responsable}"
|
||
}, {
|
||
"id": "8105d295-cf16-4d20-9442-2a2487794f0c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "594fc8a5-9c7d-4eb3-a91c-57b4c767e423",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "26b34df7-3a41-4b06-8c4f-d44332771388",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e4abd389-b84d-4765-ac92-e6b81f98aa9f",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "9c7bbbc2-230e-4801-977a-4c68176f49a6",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "9a06fd19-ed46-460b-9a90-69f38435f6e9",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "5e02f2f1-585f-40d1-8b31-3d8b725c1f45",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "597b48f1-3a27-450a-881a-4b6ff46b89f6",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "3c543bc9-4f56-4c5d-b43d-2b55b9c3018e",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "4e43bf74-a10b-42ac-b64e-436d89e5e51b",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "2b1b82a9-016a-4c6e-9c7d-8a92b5182888",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "f382f8d8-6a34-4c74-8952-1c225420bfc4",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "f4949ce4-37ae-4f1a-ad5b-43ef180a1f9c",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "4c8764cb-88c6-4bf0-b19a-a2c0e2e55691",
|
||
"comment": "Rattacher à un membre",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "aff4df02-ad45-45a9-9064-59f0d0fb86a4",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8a5ca567-f988-43ec-a80d-1bb41bca727f",
|
||
"comment": "Nom du responsable",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nom_responsable}"
|
||
}, {
|
||
"id": "63c14a33-a012-4d63-adb6-867c89d23e78",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "93f0c6ec-4186-4c52-8949-35e0be359567",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5117f3c7-a2bb-48de-906e-8f4ae28551cc",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "0123bc0a-5762-4dbf-af01-a64ddcbfd06e",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "87220dbd-595f-45c8-b25d-f26b12dd57f4",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "7179000d-31a9-4bda-a7f6-82c97a9f8816",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "2580aabe-3ebf-4fc3-a275-2013947b9c2f",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "89b70650-203a-4e4b-86c3-e49a42c57c4c",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "47a06ec2-25bf-4942-ad52-b68b5c4b75ac",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "116ddb48-4dc9-405a-ac47-dce8fd3e6f63",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "9b5410e2-24da-4620-89f9-714db8bbeccc",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4d6fa971-0517-49c3-b342-e53e4093a2a5",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "64bebdd9-e465-42ef-a40d-d04659803932",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "71f41783-8a82-4a83-acfc-c6e2dace3d26",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "6c49dbc2-f385-4976-86ce-a2823c746281",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "574e8477-a4ed-46c7-a3ce-e019cda8f132",
|
||
"comment": "Vérifier Membre responsable",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(., \"Membre responsable\")]/following-sibling::dd//span",
|
||
"targets": [],
|
||
"value": "${nom_responsable}"
|
||
}, {
|
||
"id": "5c694f9f-2e9f-4367-9b7f-cf742b9c10c3",
|
||
"comment": "Afficher fiche du responsable",
|
||
"command": "click",
|
||
"target": "xpath=//dt[contains(., \"Membre responsable\")]/following-sibling::dd//span",
|
||
"targets": [
|
||
["css=dd:nth-child(5) span", "css:finder"],
|
||
["xpath=//dd[3]/a/span", "xpath:position"],
|
||
["xpath=//span[contains(.,'Zhamberlain Luuc')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a798423d-11fd-4a30-afee-422d143ac052",
|
||
"comment": "Vérifier numéro responsable",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero_responsable}"
|
||
}, {
|
||
"id": "75a18d53-6a37-422d-b3c0-ee8214774ec9",
|
||
"comment": "Vérifier présence membre rattaché",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//dt[contains(.,'Membres rattachés')]/following-sibling::dd//span[contains(., \"${nom}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b80eb8cd-4154-4216-a7f2-0f3ba28600ec",
|
||
"comment": "Retour fiche nouveau membre",
|
||
"command": "click",
|
||
"target": "xpath=//dt[contains(.,'Membres rattachés')]/following-sibling::dd//span[contains(., \"${nom}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6613c9f0-d47d-48a6-b396-68bc5e3c5721",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "d4a803d2-5b84-4cda-a7a3-c5b5142c6812",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "63619154-1f63-429c-9be0-7e014283ddd4",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "c4a67d17-17ef-4af3-89ef-42dc59c5db55",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "547562da-703c-40d9-aa51-795ac6d63dfa",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "8a979c72-c25f-4140-809c-af964bc07efb",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "bfa25d47-d5d8-4544-a06b-0686f18c6e08",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "5a1d9eaa-772b-4e45-8667-3ad65ba557f6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "4b43fbd3-1da6-4eed-94d1-ec2af53980e0",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "16d27d73-b816-4cbf-b4e4-e83dcfd6c75a",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7bffacb6-36e7-4eff-ae72-816231e3d7aa",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "270e237e-edeb-4cd0-821f-3aaae082002e",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5a5d7b3e-c066-4355-bf66-026861e775dd",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "83db0aa0-420f-4c52-9af4-4b9059825bb7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "edf49f14-1b94-4bf7-b9de-f456035369a9",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "20360774-e683-425b-a9b9-350dc0fb6ef3",
|
||
"name": "3-06b créer membre rattaché Plusieurs choix",
|
||
"commands": [{
|
||
"id": "f2ae936e-54ea-4773-82b2-581ded63ce85",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "97b81218-28eb-46a8-905f-692459d24c28",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "babda5cf-a571-42b3-b3b5-7a668153cade",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d964a6e7-eaca-4008-879b-ae56fd2e8fe5",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "f8c8d715-ecd7-4417-a26e-181520963dec",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "60703fc4-811b-41de-90d5-3334475e50d1",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a21ed2e8-9e3f-4687-9d02-17bcb53a0a90",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "55db0a06-ae98-44a3-9ba2-d24c5faad807",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "48e88160-9e46-42c8-92b9-98ea1f10b772",
|
||
"comment": "Créer un responsable",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a82b78fc-30dd-4265-bfc7-e6ab8ce21efa",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "bc2b3008-e73a-45d5-865a-1de7c9d64a71",
|
||
"comment": "Mémoriser numéro du responsable",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numresponsable"
|
||
}, {
|
||
"id": "d4da98a2-1f99-4b36-a056-2a9617c77f6c",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [],
|
||
"value": "Zhamberlain Luuc"
|
||
}, {
|
||
"id": "b4f8e92c-22f3-4552-9fe2-d60dec886d67",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "bc1dc0c2-5755-4c9c-b9ef-7fdbbed6d366",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "8a8ab9cc-8d39-4462-9acc-611144afaab0",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "9c4d5fc5-0925-434d-928f-8696ad7e0f6e",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "08ab8378-1cf9-4309-9ad7-d08caf770986",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "9cda4c46-e4df-4959-9cd7-b06c69e958b3",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "amber",
|
||
"targets": [],
|
||
"value": "responsable"
|
||
}, {
|
||
"id": "bfedc5a3-ede2-4b22-bd92-b41fc938aaa0",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "a660f928-50a3-4a6b-b546-987e13b853d1",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "d6004a7d-2ba3-402b-951d-28b88e2f8748",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "df681c95-e148-4183-90d2-9336eeb2c1f7",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "6132c6ba-d8e9-4071-b578-1b1ec23cad93",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "67eb1920-fca1-4e10-8f85-1f2e115b140d",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "2b93bfdf-8047-4db9-b8ae-ac7b72a83213",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "f0416e70-9d9d-4a3b-80c6-340b126a7cd6",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ab243806-0d90-4a82-97e2-4042e5a4ffa4",
|
||
"comment": "Rattacher à un membre",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "33fc4b2d-332e-4939-b42c-a93f4534fa7f",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "fa5dcb95-9a58-4dd3-9e66-7cc921aeba50",
|
||
"comment": "Nom du « responsable »",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${responsable}"
|
||
}, {
|
||
"id": "9e314338-511d-47a3-8a78-8cc505c9cd90",
|
||
"comment": "Chercher",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "7b040013-c87b-4a7b-a4f9-2c62b25d9458",
|
||
"comment": "Nombre de résultats",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tr[@class=\"clickable\"]",
|
||
"targets": [],
|
||
"value": "nbres"
|
||
}, {
|
||
"id": "e6597a7a-00f4-4e29-88ca-7b9620fb90be",
|
||
"comment": "Mémoriser le nom du responsable choisi",
|
||
"command": "storeText",
|
||
"target": "xpath=//tr[@class=\"clickable\"][${nbres}]/th",
|
||
"targets": [],
|
||
"value": "nom_responsable"
|
||
}, {
|
||
"id": "ab5fc475-a753-4794-a079-9e56aa934044",
|
||
"comment": "Mémoriser le numéro du responsable choisi",
|
||
"command": "storeText",
|
||
"target": "xpath=//tr[@class=\"clickable\"][${nbres}]/td[@class=\"num\"]",
|
||
"targets": [],
|
||
"value": "numero_responsable"
|
||
}, {
|
||
"id": "39259fec-6864-408e-a2cb-63de066be762",
|
||
"comment": "Choisir le dernier",
|
||
"command": "click",
|
||
"target": "xpath=//tr[@class=\"clickable\"][${nbres}]/th",
|
||
"targets": [
|
||
["css=.clickable:nth-child(2) > th", "css:finder"],
|
||
["xpath=//tr[2]/th", "xpath:position"],
|
||
["xpath=//th[contains(.,'Lambert Paul')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b956a3ca-b6cc-4f2d-87eb-fe57569c5f14",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c204ecde-b1bd-4d13-8197-5ff66eac6e26",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "ef7bbdd6-6bd7-42fc-adf5-c5b7541ffd86",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e7352d9a-e97d-4d65-ab0f-78de2d460c1b",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "c1d15edf-5f8a-41bb-af79-ac49c8f9947f",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "91702519-b59f-4ed3-8074-fdbc639ece86",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "77b09efa-dd77-4722-8560-a1fca6f42aa3",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "7d7c8ff8-fe9e-4f64-a245-23314e6059a8",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "b4abda30-1256-435a-b3d1-43c9778003d7",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "6f82bfd4-4519-4413-ad9f-fb6e8ff936df",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cbe9b2a5-b3dd-4400-a9a6-d04333460420",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "020cf20b-4554-4fc8-b7f5-ee73663838dc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9c7b5cef-20c9-467d-942e-6c720d384fcc",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "d24383f5-2919-4803-9cb5-1377a51c0d27",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b13a885d-232a-4678-a650-80d6bc68be78",
|
||
"comment": "Vérifier Membre responsable",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(., \"Membre responsable\")]/following-sibling::dd//span",
|
||
"targets": [],
|
||
"value": "${nom_responsable}"
|
||
}, {
|
||
"id": "c4a7e9b9-43dd-4b45-bf6a-358cd126a91f",
|
||
"comment": "Afficher fiche du responsable",
|
||
"command": "click",
|
||
"target": "xpath=//dt[contains(., \"Membre responsable\")]/following-sibling::dd//span",
|
||
"targets": [
|
||
["css=dd:nth-child(5) span", "css:finder"],
|
||
["xpath=//dd[3]/a/span", "xpath:position"],
|
||
["xpath=//span[contains(.,'Zhamberlain Luuc')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "63b99000-3d03-4c2a-a00e-bcbf14248841",
|
||
"comment": "Vérifier numéro responsable",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero_responsable}"
|
||
}, {
|
||
"id": "de2bad37-9847-4022-9021-319c58b14139",
|
||
"comment": "Vérifier présence membre rattaché",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//dt[contains(.,'Membres rattachés')]/following-sibling::dd//span[contains(., \"${nom}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0fc66279-d61c-4fa7-ba80-19dbc9ebd359",
|
||
"comment": "Retour fiche nouveau membre",
|
||
"command": "click",
|
||
"target": "xpath=//dt[contains(.,'Membres rattachés')]/following-sibling::dd//span[contains(., \"${nom}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e8bb762d-76f0-4ae8-9725-d2bca0741b1b",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "001e8d83-d171-4503-ba2f-d6ffd72dd9db",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "f7765c6d-d42f-4af5-a939-87a0cd971447",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "2e5d7700-563d-4e05-a605-3314c332f2d7",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "b4833f59-a9ea-40cb-a316-3f270fb7173f",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "63cff9d3-1cdb-46a3-a670-76b0bc53a743",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "ae725152-288c-4c63-9646-267fbbaee64d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "60ee30c9-c42f-4b07-820c-5c1c76eac0fd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "1bf4a8a0-7b6f-4db9-a28e-900fcd898944",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "c0550765-8b44-46f9-b642-895e54386c81",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e01cf96b-63e8-433c-b510-0e738e52078c",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "ed16361f-1057-476e-8ce9-df70ff70ed6e",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b13e8002-3893-465c-b756-9e64366868e4",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "76f4cd12-e93c-48d7-9afe-ebcc651ac749",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "137c3d09-9d21-407c-95dd-2fd5df6783ba",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "91ad3d23-dd66-4084-beeb-ea89ec4bfabc",
|
||
"name": "3-07 créer membre numéro choisi",
|
||
"commands": [{
|
||
"id": "a6972706-0c56-46c5-9a2f-5f9ca9e7a52b",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "018973f7-b11d-484d-aa28-c6a4f285ae02",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "22dc193e-b428-4fbb-8b56-bd18df5953cf",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "febc4e85-ef86-4e24-a3dc-59d93a851213",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "6a85ce0e-3646-481f-bb6b-1289ea0263c9",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "b9ef151b-b129-4875-87cc-a1c5abe41daa",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1ecc6344-fe94-4259-b248-66196528f5da",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dcf673d5-479f-49ef-8d5b-52e0216ca13f",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "09066653-b8a8-4ec6-ba3f-b1defc04890a",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "f97e3190-ae0f-4de0-bfbb-1e03852597b2",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "50e4310d-b75e-4990-8bd3-b8b385cc0b37",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "0e7fc5d1-d5aa-4efc-b5e6-396ba22331c8",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "8e11d770-9756-4f0f-a779-b90b730fc91b",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "299ec2d6-d8e7-43f5-ba7c-002612ea8bd9",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "57b91f4c-9c1c-4466-933e-8be7d3ddf839",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "32ba984a-1f16-44b3-bddf-5992ad65c69d",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "7db8cce3-6e38-4098-92b0-be0f3bccd28f",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "ff2f7191-51e1-4318-a9fa-1a37b3f201b8",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "d7ceb825-e0fe-414b-950c-10ec99ddceae",
|
||
"comment": "Numéro proposé",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "cf4d7e4d-dc1a-44e2-a396-f5fc9481f207",
|
||
"comment": "Choisir numéro de membre",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numero}) + 100",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "20bbc394-9977-4ee8-b73f-982cf0ddcbc4",
|
||
"comment": "Imposer numéro calculé",
|
||
"command": "type",
|
||
"target": "id=f_numero",
|
||
"targets": [
|
||
["id=f_numero", "id"],
|
||
["name=numero", "name"],
|
||
["css=#f_numero", "css:finder"],
|
||
["xpath=//input[@id='f_numero']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "efcd239c-6ffc-4192-9af0-870c6104e888",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0de6beb-a913-4891-b324-9ac0223721de",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "7126a123-f17b-4004-966d-98e86c56ae31",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "22d15378-fe16-45ff-aec5-c4058e9a6f75",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "ce92e5c8-dd7d-4bbc-9c44-f805198b1e04",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "9fe5fc12-5736-46e0-8223-2eb77ed6f15f",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "725835ff-a614-4269-8547-6a324fdd2d31",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "b2f53dae-3338-4514-b7fd-2d51971ffd18",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "19e8f3a7-f81a-4b37-9d4e-5d7a84b2808c",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "088478f0-dbef-4e9b-9ecf-373eab3191cf",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "23c1e1e1-b5cd-45fd-ba68-6e74343d52ed",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "4ac05314-10df-4c87-8d6d-1a65bb4eb81f",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "270079c9-9f95-4185-bbec-22cc6df3c073",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "119b0281-b232-4ecf-b61b-05b21d4fc470",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "0ef3c9dc-98fb-4b14-9828-b0c423cae1ea",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "ce79a6a6-5eed-4afe-9144-68b090310bfc",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "7a61578f-d2dd-4a70-965b-1b758171579b",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "e5a2d5f7-625d-46a0-9de3-7505744a0cf5",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "1a91161f-ae27-419a-a04c-c70a22fa74e8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "c2d4331d-2881-4725-9ed2-cf6d37b18460",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "57244951-2db2-495c-90ad-5512f9190928",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "b846e886-d7a1-45a6-ae7b-152a77e60713",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "975edcd9-969a-430c-bc91-9ffc65061d1c",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "a6b351bb-d426-47aa-8437-fe7c482d2bd2",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3d490bef-7264-4433-ac9e-159667490349",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "2c89a233-08fd-43e8-85f1-b2ef7ed45fc8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4575eea8-fb0b-4933-a58c-4695d5e3b84e",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "c05cb267-660d-46ab-8fe9-a7e042aa9c8f",
|
||
"name": "3-91 créer membre échec numéro présent",
|
||
"commands": [{
|
||
"id": "0a919074-cafe-4f35-97d0-dff060157b5b",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3483834a-3c7e-4772-a30d-111072c1cafe",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "ec977d32-e903-44ff-9ee9-acbc1b7bcbd0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "568faaec-d3f4-4bea-956e-63d35ff385b4",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "981d273d-be9b-4c6f-b8c6-d10f6d7eaa9d",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "af5c1fd7-4e8a-4aa6-a541-622d6f37a56a",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "685c60ca-ca5d-4b9e-b468-7f686ea3bff4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6ef82a95-ee1f-4b71-9b1b-8cdca3f1b7db",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eb273f23-27f9-4f15-a21f-4854696648e3",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "0d7185be-af76-4b47-929f-fe990d527cfd",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "7b8ebf47-a369-474a-af53-7e78575dfc09",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "cb650d21-a943-4f06-9d9a-9e9941e1efbe",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "41b16e1e-ab01-48c5-a301-409dbdc6ea7e",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "4f63c95e-f347-480b-ae1a-843f631b6726",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "c1eead33-8aed-4f05-8e72-98a3ef3427b4",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "d9f426d8-9daa-4890-b918-d1426a710a16",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "c0008cbb-b899-4ea3-92ae-cec64b66fc4d",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "5fe0f5a3-4faa-4b69-bc88-7add4a656c03",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1b752fa3-3c65-4a62-909c-2cbf7150ba5a",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_numero",
|
||
"targets": [
|
||
["id=f_numero", "id"],
|
||
["name=numero", "name"],
|
||
["css=#f_numero", "css:finder"],
|
||
["xpath=//input[@id='f_numero']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "1"
|
||
}, {
|
||
"id": "bb96ad08-62c8-4d72-9abc-406a6791ebbb",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a4c24f08-a244-45ca-91e9-d8aa5f847bbc",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "12c99a6f-2efa-478d-9a0b-11ce7b4ea034",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "120d346c-4569-4203-ab5d-7517eed5a90d",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "40e6a573-2ed3-48f8-9782-18d5d4281e3c",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "4a11369b-4907-4a48-995e-03f3e79f7d3f",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "406b55bb-8572-4401-983d-6aa7ae0be342",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "36af241b-c825-4f71-973e-15c462851326",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1c713af6-54c5-4bca-8e50-4432fe0daefc",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6a7ff05f-f637-46e3-b23c-821fb439d964",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "40ec0740-36f7-47ad-bf48-1bf4aea22f8a",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "2abcc6d0-c97b-40aa-85c4-f073bc987c0d",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "14e83449-b1bb-4ce2-969c-e2c88cc2cd79",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "a6af2537-7860-43b2-92b6-1a93bb173a6c",
|
||
"name": "3-92a créer membre date erronée cas 1",
|
||
"commands": [{
|
||
"id": "828addae-4a29-465c-bc17-6f6aa011a333",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "40413eb6-afdd-40fb-9081-f224a7563d19",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "1454b0b4-bf39-461e-8c34-444c7e81e143",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8c04dc93-a051-4cf8-b13e-dc4e4f40f49d",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "8ac76b9d-cb28-4d38-92c5-38373f6e35e3",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "ec699551-382c-4405-9321-5f1cb3a877ca",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "77f14997-3795-4b97-bc6d-a8e2c15c1068",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0553c671-79b6-4864-ba71-20d75c9adeda",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "13fa53e4-8fb3-4c09-9698-cf15ef7fa7e2",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "d1639cda-f43d-4a46-8f31-a45845f18012",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "3aa81cc3-b73f-4cbd-83cc-21f995f7fb89",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "229586b3-ab68-4d2c-9311-90e5ec230ec5",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "295a7bca-2ad5-4c17-9ea0-e785cb350fa5",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "688c9732-36ae-49da-a118-d3d51d9a8f1c",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "d46946e9-e633-454b-9c9a-ef1ecfc4b5a6",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "a25a9808-fbb6-4a95-b9b2-b950c683994f",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "4baa6042-575a-4e0d-b350-4f089d9bd8bc",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/1515",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "4222fb5e-02b8-4bc3-b75d-e7be88205d9f",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "2836eb76-087c-43c9-978a-9ce995817dd1",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "31173028-aef1-4f73-9e60-6966b2b4c430",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "96caaa3f-70a3-4504-93fd-1b615fee32f4",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "ee25159c-d537-42c8-84d2-c32b418c66b3",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "ef3d0879-e451-4069-9baf-54b6cb5811cf",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "252d1735-6a43-464c-b446-c737858b3e49",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "480dbe17-a9be-4467-a42a-11b8198074c4",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "3a1153c6-9a18-4e12-9b7a-c0484929a5f4",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "37a52481-ef23-4cb6-9e89-4068a9a3a5d3",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7e74176f-2d36-4351-96f1-bd33f0d0ff2f",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f4e66ef5-12d1-47e9-866d-49b2c0450543",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a89cc104-19ba-46ae-b372-d72a88b54468",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "8f0bd285-4016-4179-a76b-a5fee22710c6",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e9a7eab9-6c71-4dd0-a53c-9ee26d250975",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "155a53f2-766f-4748-b11f-722b520df2eb",
|
||
"name": "3-92b créer membre date erronée cas 2",
|
||
"commands": [{
|
||
"id": "bae01400-5545-48b2-a212-5d4cd5c50797",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ebda2a39-b8ae-449c-9899-aea0296c87e2",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "5e29b334-2db5-4bb8-8e23-f0e2f532eceb",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d983797-f698-44f0-8946-f3986c665f6f",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "3ff4319b-7f86-4412-95d3-cd13fe6cff48",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "6b9c54a7-18ac-4c39-a343-f58abfd6ec1f",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9c0a1f61-0f78-45be-b114-d5f8eafc5696",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f7355136-612d-46ba-9635-bf1eb273e276",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "646291e6-03dd-41f7-8d6e-4afee8bfb522",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "262ee9b1-5c47-465c-9342-287c39838070",
|
||
"comment": "Nom & prénom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ff4352b0-fa9f-4d96-bab3-b306c1e974fe",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "3ff2f21f-b062-4265-bfb8-61d2255cd722",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "4334f5c1-f9e5-40ef-9526-f73043072ea0",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "cb59498a-7399-4952-8c12-96e5c51842d7",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "49667317-b1cc-4705-a4e0-7a8565065d67",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "bfb9295a-650c-4050-a630-74d9ff5471bc",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "ba55dd35-73fa-4db1-9c1a-d2dfdfdbb801",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2105",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "c3335bd0-4144-4978-a536-f06cd2a92135",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "65c47b88-c005-43f7-83b5-96249f4f1b3d",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "b22b8275-a0ef-4e03-b82e-5dbf47b4e984",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "7e1ff47f-54ff-4f8b-965c-35631d6e3d52",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "def2b845-4e2d-4273-8f6d-c975aa21ad80",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "d3e7886f-363f-49d8-9c4a-267dd8b4ca37",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "d68fcb4e-45d6-46eb-aa48-3f825ed3e120",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "2aef92de-5e3e-47e8-ae4f-0b49af16b143",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "6a542e83-7389-4b30-9710-e03cc080ca77",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "09c17bd0-afbf-4408-9e22-31f5b5990458",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8438637f-0b67-49be-9cc7-8d7cbb117d4a",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "054c3b19-44ff-4b69-9179-b27179048ec5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fac99186-dd38-41a7-9297-7933794151f5",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "8c0979ad-246a-4712-b51f-e505e5a3d059",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "7e1d0aa1-4975-42fd-bdc0-096c04f082ab",
|
||
"comment": "Erreur ?",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "4369d68b-3e2c-470e-b2b1-5a0825c35aa0",
|
||
"name": "3-93a créer membre nom présent refusé",
|
||
"commands": [{
|
||
"id": "de0c9cad-cb05-4f20-ada8-fe2924b92d08",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "357dd2d2-0d7f-4f4e-9ab1-77ca73ee134b",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "9f6d9ec7-eab1-4eb8-9046-e15e479a918e",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a45246d5-44a2-4e0d-9675-23cda2db2f3f",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "a80535d7-5cb4-413b-b809-69d990ce5ffa",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "26ef5b09-1393-4579-9c78-bb55ed484463",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2e57f89b-eb5c-406b-98f6-68f2d9ec0e21",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d6303a2d-1fb8-404e-9639-99726e7507f2",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc9a7604-8fb1-49fa-a6b2-ad079371e7c2",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "b2e217e2-def6-41a8-ab30-a1a6f454f51f",
|
||
"comment": "Nom en double",
|
||
"command": "store",
|
||
"target": "Lambert Paul",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "32184ddd-c7a1-4abb-bd02-8d31941f661d",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "0f647a3d-21f1-4831-a59f-d74bcd35d103",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "18f94418-d7a0-4f21-9d0d-a34b3ae1eb37",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "097ec1c5-8442-4d4e-aa65-128b105ca4bc",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "664cf575-3f94-4d24-adf2-5f0b9ef5307e",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "46b5f764-f3ef-45f0-9d8e-1cdaab6390af",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "a13ecf6e-0e0a-437f-9070-9e5e4ba7c28e",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "7a7ff05f-0cee-425d-adb9-d8d4fe9b5942",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "5081e469-29a8-4f05-bf22-2a9d9f808a54",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "49e58e12-190b-4ce3-915c-74154106477c",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b5824593-52cc-4934-ba19-deed04a17408",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "876b2509-459f-450b-9832-efd47612e3e1",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "9c11922d-ce4d-4b4f-a4fe-84bb6bcf98db",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "bb1b2f59-37ed-4822-8501-a45925d9d149",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "62673593-5315-41e9-a1a1-86e52a05b0ec",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "1d40a16d-0754-4cdf-a61e-f906f7721328",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "9f1bae31-b61e-4568-8bda-a07cbba34c75",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "15348857-a8d9-45d4-9ffd-9f4a801beaf3",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a7d57bc4-10b6-479d-9309-ed3f8fea3fb0",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ca0add45-148a-4053-bffa-df6390a147b8",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "36f55bb7-97c0-4710-aa16-a36f5be40379",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "aa609cd7-aa9d-4752-960c-34717346ce1c",
|
||
"comment": "Déjà présent",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//p[contains(@class, \"alert\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "077fea95-219b-4ab2-a10d-800ec7f39fb1",
|
||
"name": "3-93b créer membre nom présent accepté",
|
||
"commands": [{
|
||
"id": "d4554ace-88d7-4d2e-83d4-7cce4097aa75",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bf1bfa0b-e029-4893-a2a5-7be8f1f65966",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "b93fb8f7-746b-4a39-b170-63bffa038554",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6d18f281-9ed6-4d72-8408-cb237c41e733",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "2dc71349-30ab-4301-a143-d062efe8f95b",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "9bdb0cf1-8b9d-4b3c-beea-ec07e1fc40f8",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d5ee3b2f-ef10-41f7-82f4-3f0a74312fd5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2b703a81-35c9-4bbc-9025-39e05814a471",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "be10eb6d-36b2-40c8-84eb-6580af51bf18",
|
||
"comment": "Catégorie du membre",
|
||
"command": "store",
|
||
"target": "Membres actifs",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "f32fd2e3-d4f6-4cc5-ba37-5af1352925ee",
|
||
"comment": "Nom en double",
|
||
"command": "store",
|
||
"target": "Lambert Paul",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "920c27e9-9949-4592-a8cf-87b4cd4ab021",
|
||
"comment": "Adresse E-Mail",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "3f6f2d20-719c-43da-bffc-da4a22deb2eb",
|
||
"comment": "Adresse postale",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "d5e587e9-c742-49b4-a9f4-242c8241b1c4",
|
||
"comment": "Code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "93ef8988-e1ba-4852-9fcd-1248533bbc07",
|
||
"comment": "Ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "4a669a98-9fe4-4cbf-8016-43d5e0197f3e",
|
||
"comment": "Numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "6528d530-c349-4034-9176-2fa6ae5db9bc",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return false",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "605b1dc2-09d1-4532-ab37-f58ea2338d60",
|
||
"comment": "Date d'inscription",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "442cc883-b598-4fd1-b9db-d85d6c04bf57",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "5330b5b0-7442-43c2-a517-1d6e7891aa46",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "aad56270-3032-42c7-b9a5-1f383ef2f20e",
|
||
"comment": "Catégorie de membre",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${cat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "45f75a2e-16c7-40ff-8751-0841957beaa4",
|
||
"comment": "Nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "3158b5d9-9f9f-4f71-88e8-0fed3c3dd631",
|
||
"comment": "Courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "3d1afcff-1633-4ead-8af5-fe995229c22e",
|
||
"comment": "Adresse",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "7c51d5f4-a9d3-4e83-bd05-574855dced14",
|
||
"comment": "Code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "b8623938-de5f-4a92-9761-1759986cacf4",
|
||
"comment": "Ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "8e8a1e7b-0865-4bf7-8177-a46482c6b727",
|
||
"comment": "Téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "0d94f36f-b5ca-4e8a-9f65-3c64c8964718",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "98cf1afc-9562-43bb-8318-a0e1c18b85d3",
|
||
"comment": "Inscription lettre info",
|
||
"command": "click",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "79d4eea8-aee4-4f32-a83b-a8965c13f38e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "be81785a-7ad7-4ea4-a6d8-f673d1e4024c",
|
||
"comment": "Date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "bd7b5d55-6584-4837-b684-dcfec9255f71",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "745ff6f9-4890-4bf9-836c-f46f55ca5a37",
|
||
"comment": "Déjà présent",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//p[contains(@class, \"alert\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a7705060-457d-4854-8a3c-9f427fce7a01",
|
||
"comment": "Accepter le doublon",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.icn-btn:nth-child(5)", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "605865cd-94f6-4420-a15f-660a4e1975c0",
|
||
"comment": "",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "46343db0-3e17-47bb-bb70-dffd007d817d",
|
||
"comment": "Vérif numéro membre",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "75a52ac5-5286-409d-8591-efefa27c680b",
|
||
"comment": "Vérif nom",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "505dbd0f-9d76-4042-8197-3ee5b54e0a65",
|
||
"comment": "Vérif courriel",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "9101d731-d209-41a1-a280-307e54af0045",
|
||
"comment": "Vérif adresse",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "052708c2-eb37-4f7b-a11a-4dc615aa84e5",
|
||
"comment": "Vérif CP",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "6d74cb87-be97-42b4-93f1-c6e9a7b41339",
|
||
"comment": "Vérif ville",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "b48b7328-507f-4fc5-9cc0-72e2ec594aed",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "00f4e960-2c86-4f72-83fc-5a6c677ac986",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "1156bdd3-b6f7-4a2d-87b3-24a4724976f0",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "ae682a21-6c75-4dcd-8415-427394d244e2",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "109033e5-d2a9-4b96-acc8-1a8d57fd5ce8",
|
||
"comment": "inscription lettre : oui",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "00f3d6eb-5581-4a7a-bccc-9962760ad81b",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0e16146d-d672-4b75-b446-134bbb77a17f",
|
||
"comment": "inscription lettre : non",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "8fce980c-51c5-4dae-966c-6c72f35870b7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4e4ebdf0-40eb-4f2e-9b40-e2795ff72953",
|
||
"comment": "Vérif date inscription",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "9d3d8f41-bff5-472e-ac87-6de5f10b4655",
|
||
"name": "4-01 lister membres toutes catégories",
|
||
"commands": [{
|
||
"id": "9f50e061-8d46-4a07-a6ae-3e39cceb9bc7",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "78e25862-14dd-471d-8801-5bab32a275c2",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7a9b145a-9ade-4266-b45c-aef9692a73aa",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "2cfbcda8-2ea9-43eb-939a-6dc84c27b9e8",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "357ca39a-5c70-47b1-99d9-bcde6ba80376",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "0399e45b-7cc0-4d57-a5e3-a3b362929856",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "b1083b43-25b3-41a2-85cd-095762a21a9d",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "342961e1-537c-41b6-8ad4-b353b4f62251",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0dff1226-2127-497e-963d-dd7f1734bf58",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6fe95231-a118-465f-b59e-20293b69f974",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "1c28edd0-3f87-4398-94c8-80312859fcb5",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "d2db43c2-e379-4a0e-b4d1-f35307988d1f",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c600a59c-df0c-4ba9-ae02-2760c8fc0bbe",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1fae1452-7af8-4405-8127-b7842f091b3f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "e1792ceb-1d51-45e4-a86a-3e1dd9c8eb1b",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "87c6a1a7-6f43-4d1b-8944-b30a9baa9734",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "552a98c5-fb5a-4f84-af5d-0dab0f48c417",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "cee12e74-bea1-40af-97aa-4fab48cd1538",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "6c900966-b2b0-4ce6-b39b-769ec95461a6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "0e119e93-98bd-4268-91e9-20b852615a11",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a6f6b81d-61ff-4c0f-9825-ee98a7296abf",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2a42d2f6-0909-404e-980f-b00f53846cb5",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d85b23b-fc76-464f-8214-a7431d67846e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "7df9291d-15b4-4144-841a-514abebfa193",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "6d5e7780-37cc-4440-9a3a-6c9b9c999014",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "06d7ab25-f616-4918-b1fb-4a2659246a6b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c7566eca-44d0-4405-b19c-d5336898f1ff",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "ee565b99-6a31-421d-861c-178abd1e339b",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "21c0c151-eaf8-4fc3-9824-97d25f90cd0c",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "31675346-22f0-42bc-8209-bf95f20de762",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "81f68bac-7994-4a5c-a833-65e3872a9a04",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "07ba4510-dbb0-4cbe-9ed3-86d15f8bc6f2",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fc54fca2-285a-498c-a46c-d1d21db17b04",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0dfb30d4-f667-40b0-a30b-ac570fc27408",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ddd854d8-2993-4be5-bc3e-afc5edf26a0f",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "5f4e6a59-0099-4eab-9320-462fc11ee963",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c454ccfc-0327-472c-b7cd-e67327a156fb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "dbb0604b-27cb-47b0-832b-b36c21ce6d5c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "f3a183e6-7872-4f75-88ca-479fc209f2be",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ee448e86-3562-490a-82e6-c163cc4d504c",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1fce9227-6ca2-484a-a7fd-cbc894b3bd6b",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "9e7ddbcf-97e8-4219-8860-e0c8c840e8ae",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "e4ee02a6-9079-4321-83b5-c09a9a7b12a8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "fd4acfee-a918-481f-b15a-78c7d4f132aa",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "3e327c55-10da-4cdd-9662-35b296c93645",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "7ecfa494-d698-4428-8bae-4c024b2eb9a0",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "bec563ad-66fb-43bb-89cd-7c5d73d873de",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "74d311dc-6673-46e9-b341-db6b40766f51",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "ffb5a045-2e68-4e6d-801f-37fe2d7a1ccc",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "af3b1cb3-b67b-4868-ba4a-353b7a119d52",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "440e410f-fc5b-4d9f-91e4-f890b9e9c8c7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6152acac-1ffb-4d42-8c60-3d49c68288ed",
|
||
"comment": "Trier les membres par numéro croissant",
|
||
"command": "executeScript",
|
||
"target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } ordre = croissant ? 1 : -1; tab.sort((a, b) => { return ordre * (a.numero - b.numero); }); return tab;} return trier(${lesnumeros}, ${lesnoms})",
|
||
"targets": [],
|
||
"value": "membres_asc"
|
||
}, {
|
||
"id": "e84077f6-9802-4529-b6bb-dd0cbe1aeb4a",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a2e1c19b-58ea-4767-b57f-946ec6f7f195",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ebbf611a-7799-4508-9b1a-a3262538b6aa",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ea2c1424-4106-4a82-89d7-a32b7255feec",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "aa7246b5-6626-4c83-886e-0b2f315746b2",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "663a9452-4167-4c30-bb91-0cd88e32c436",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "91a56875-2fba-4dd6-b1ac-4bd81d67e31f",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "67105636-1763-4157-a571-a321eb2c01af",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "ca6ee8f1-e083-4c60-8b96-a49464c8e197",
|
||
"comment": "Trier par numéro croissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5b19a75f-b016-499c-8db8-e907b276b093",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b407e63f-0a39-4e30-bdc9-43aebecc38c7",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "00256540-4d40-4fca-ab05-a10d91a1397a",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "59a07c46-205d-4cc3-b334-8a3153e9477b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "961d3be4-bb54-48f7-abd4-d35c417b7248",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "56b70964-b497-48aa-b3ff-eb54ff124aca",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "77f481d8-633b-44fe-8cb0-d941ca20556d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "50e7fb6a-c8ab-4b1b-a765-8715d1e68996",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "42e53770-17f2-4c0f-8c78-610fc872d594",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c52202fe-83ee-4822-b1a9-b698089f794c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5830c22e-3ad6-4bd1-b721-fa927b18a6b0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "4a6b8e85-6600-480b-8e16-f4ecc449e5a9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "00ac421b-cac4-4a8d-8b24-308a7ec91ee6",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7042fa0d-3c09-4ce4-8407-cf2d7d876405",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c9bc890b-135e-4895-ae62-3477caca40dc",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "962bfd5c-bc2d-435c-b026-994195c8d2e3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "6390b5f3-3691-4a0b-bc9b-90a6fe718d3b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "784be5d2-2683-48cb-b6cd-473c524fa654",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "94aa7f6e-1c40-4ef5-b0de-e3cf12bde373",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74565202-176e-4a11-a97a-c9b1cac0018c",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "1585f6e5-197e-4b40-a88b-1cf29918c7e6",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "d058737f-0fed-4d12-a472-120c811851f5",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_asc}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "7018c3d9-7f40-460d-9905-856e25ba15ce",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_asc}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "7baf6514-7c7a-4c19-9860-2ff69f919b35",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "63b60f9e-d4ef-4db1-8c73-8ed958872e41",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "10fc39a5-a9ad-4e11-96be-e934245e699e",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "165772cf-fb63-4262-b414-5cede2505a89",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "0cda4ee9-fde0-4f55-af55-9fcf08644a86",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "4472d9b5-ee32-4778-a905-847cd4d99a22",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64",
|
||
"name": "4-02 lister membres sauf catégories cachées",
|
||
"commands": [{
|
||
"id": "44094def-5892-4f3f-a645-1170d72de5b4",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0fb96b1f-04a5-4d84-8d42-8ad59a7d996f",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a508b0ea-759a-4c9f-a806-e5aff4164e23",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "e29fff9a-d6a2-404d-a2f7-e2fcb3b05bc4",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3e2dd02a-1a68-4327-ae00-6ae88ccb86ed",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "423ce3d8-c9e4-4ad2-abba-6c20a76659c1",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "777b3fbc-4d2a-4823-b41f-cd3e56a88849",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b36a32c3-ece0-4338-a300-895c14d4d965",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "226e9450-ebba-4f29-8237-5a0999b7d819",
|
||
"comment": "Récupérer la liste des catégories",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7143ddd7-d2d0-4aef-8626-fcbc1b2e4002",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=.current li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "dbad02d1-8460-4433-82de-90c40bf622b9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "categories_alpha"
|
||
}, {
|
||
"id": "05d8419c-7c86-4f67-9731-d6f298468a96",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "numeros_alpha"
|
||
}, {
|
||
"id": "f846c378-f798-4a98-84e3-3eb346a0f5b4",
|
||
"comment": "Nombre de catégories",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option",
|
||
"targets": [],
|
||
"value": "nb_categories"
|
||
}, {
|
||
"id": "8e6c8a0d-02a8-4e63-90f0-aa109fec26c1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "499a79a4-44f2-4ff7-ba23-3c8e158bcba9",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} <= ${nb_categories}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d781aab1-dd4d-479e-ab8c-a391c6a450f0",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[${i}]",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "9fce64d5-e4c2-4389-b8f0-0ba41d140c8c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${categories_alpha}.concat(${cat})",
|
||
"targets": [],
|
||
"value": "categories_alpha"
|
||
}, {
|
||
"id": "a71654df-b584-4fbe-a325-ba98fd10c577",
|
||
"comment": "",
|
||
"command": "storeAttribute",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[${i}]@value",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "5143da8e-ba7d-4918-aa57-6efaa6acf405",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${numeros_alpha}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "numeros_alpha"
|
||
}, {
|
||
"id": "4b9c1dbe-52e3-4f74-9fb8-f18103d0c4a5",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "fa89a209-7173-49af-81fb-54ee9523f0ba",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4839ebe0-e441-4f4d-af1f-324a378db89e",
|
||
"comment": "Trier les catégories par numéro",
|
||
"command": "executeScript",
|
||
"target": "let tab = []; for (let i = 0; i < ${numeros_alpha}.length; ++i) { let o = Object(); o.num=${numeros_alpha}[i]; o.cat=${categories_alpha}[i]; tab.push(o);} ; tab.sort((a, b) => { return a.num - b.num; }); let categs = []; tab.forEach((e) => { categs.push(e.cat); }); return categs;",
|
||
"targets": [],
|
||
"value": "categories_num"
|
||
}, {
|
||
"id": "e06c9e97-2f70-4651-8689-47a5f3a3a2bd",
|
||
"comment": "Afficher les catégories",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "7909c8e3-5efc-401f-9b78-cbe6cb99e182",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_categories}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9e47641a-d5a9-42da-b622-328bc1dabe22",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${categories_num}.at(${i})",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "c6c7d10f-b87f-4e18-9f8c-42e794a2c548",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "c0df0e94-678e-42d1-a144-afd399fec3a1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "91ff712c-4a7b-44c8-852e-55b81d47a4cc",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4e349809-3a92-4239-9ae2-eb1888e351f9",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "8fdeb066-bbd2-4acf-921b-97f22290b7a2",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "38440cf4-eb2b-470f-844a-39fe9e8cc636",
|
||
"comment": "Init liste des catégories",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "921fa05f-324c-4b64-93a7-99f38653c8be",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b0d7dd5d-43ea-4cc6-9411-408fca036655",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e269bead-588c-44f0-8c28-8bd4f6203a4f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "8d008c57-be62-4b85-acc2-6112bc5e7770",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "de1c30f0-79bd-4618-9921-67eef1aeb0bd",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f5ec189c-e49f-44e2-82e5-6a8ff06c84bc",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7daaa007-177b-464d-92d7-5a579f923fda",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "65036379-9b6f-47bf-b035-4cfb2c5224db",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fb051cd6-1781-4d85-8c12-141727ebadc0",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "a12e6ac3-44ad-4dc4-9cf8-9ddb3307310d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "0b5e990a-a563-4804-8c8c-ff3c72a25ac7",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "de6299ad-2c41-4d4f-9be3-03b52570cd29",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "30e1f657-1c26-4bad-b40f-baf7e534c38e",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eac1e541-5f49-4381-bd1d-7b9940e5d8be",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b6f25ab-de35-42ae-8e10-45e8897e3086",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c337335c-9802-41b2-9039-2330661fa9c3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ae2de33d-e456-42ff-bab9-b22e81278490",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "2bc01878-0396-4c1e-829c-5269db265d17",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "1b0d6414-b1a0-4cbb-ace7-e0773333ef5d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "c65bd666-3468-42a3-a08b-b9123bf518ce",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1ba32db7-8161-4b92-959b-c91dae085f83",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6f3aef8b-133f-45be-97ec-053a89359a6f",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5648db01-774f-4524-a485-ccc8f601c770",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "ce22ed1a-78ae-4cdf-b891-cd0f0ca92fa7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c9951ea1-ce87-41fa-9abc-34799278e179",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "b40f475f-b890-4295-91c0-6a9c4bd950dc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "91d75ba7-e12b-43a1-ac78-e132326a9f51",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "a3337044-bcf4-4ed6-9e83-f4fee3fe0484",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "a0203550-7e83-49df-bd5d-708bcd34b0a0",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "eb4cfd97-d688-4b13-9a22-6dccc472770c",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "a7870754-5bee-41e4-b293-7050ea0731e3",
|
||
"comment": "afficher fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "80975742-8dbf-4c88-b0a1-12684a81d18c",
|
||
"comment": "Catégorie du membre",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "da73d314-a4df-497d-a538-5ec456f2b7ea",
|
||
"comment": "Trouver le numéro de la catégorie",
|
||
"command": "executeScript",
|
||
"target": "function getNumero(cat_name, categories) { let i = 0; while (i < categories.length) { if (categories[i] == cat_name) { return i + 1; } i += 1; }}return getNumero(${categorie}, ${categories_num});",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "18e8efe9-1991-48bc-a0ae-441f08baac6c",
|
||
"comment": "ajouter numéro catégorie à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "09757cfc-8f04-4456-8676-90bb91dbad74",
|
||
"comment": "Retour page précédente",
|
||
"command": "executeScript",
|
||
"target": "history.back()",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e4b1f50a-0d73-436e-b080-d5ac18901c78",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "6f66696f-9095-42a7-a3d5-a5d529cc2dbe",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "29d28440-1138-4051-8e64-874fd06db9c5",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "49841a76-f86c-40d2-9775-4dee82495130",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9be59ed8-d69c-41e3-bd30-b98128307369",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "ca1bbf28-07e8-4c08-951c-091e496a9038",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4eae93aa-d7e1-4387-8fd1-5e35f25550c6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "64c5a987-1244-4304-8aa1-c5f832c9fb39",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "4f3b6610-df08-4e94-9def-70c61b777ec9",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d8a7fb49-a1d0-41ba-b254-697aac66ab02",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3aba2105-2f80-40b7-a087-b09792cbd359",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "0eba07c9-5569-429d-9b4d-4e17412871ce",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "a0a91628-3459-4eb1-b079-5c7e72c59151",
|
||
"comment": "Générer numéro catégorie",
|
||
"command": "executeScript",
|
||
"target": "return 1 + Math.floor(Math.random() * ${nb_categories})",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "ce64b9de-0b72-4a11-9665-6c4d18777f9c",
|
||
"comment": "Ajouter numéro catégorie à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "b8c1924e-3d93-45a2-9d10-c6fe6931e451",
|
||
"comment": "Sélectionner catégorie",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[@value=${num_cat}]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d9b7da2c-a458-4406-ad66-8ba48e9b171d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ee491f78-921e-4217-ad0b-12da3515c00c",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "fd59fdfa-40e1-40d5-b487-8311c41fdc86",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "79918399-a69e-4815-a44c-daa9533ac10c",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "fafe1340-236b-4199-8898-2815c385abfd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "e4b88e80-c9ea-4c47-8095-edda4f31389a",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "b8312fab-db26-4c94-bf73-a92975a2df9d",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "de229a07-6a36-4519-8c46-3e7097fc485e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "e8d3bc93-8eab-4fd4-b24a-e85112abad20",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "17e53936-341c-4176-8b27-3494afd028d2",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "54b32a82-a7d6-4a4e-bd86-a93ce8a9cce7",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "35c7f1ee-c6d4-4c68-8105-52f683ed4a42",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f9f322c8-0de9-48e9-8990-2f021c278f01",
|
||
"comment": "Nombre de membres non cachés",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, sauf cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "4d07de3a-06d5-40ef-ba31-9053846c1fe1",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "56ab778a-c590-4196-8168-533eaa8ab61e",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "nombre de membres non cachés = ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3ed9c9d2-68a3-40fc-a135-bc73703f1505",
|
||
"comment": "Filtrer : toutes sauf cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, sauf cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0b82dd50-4d42-4002-a889-e16a258839a8",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c8368860-7f40-48b4-aec8-9543f9ffeecd",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e17bc397-b18c-42d7-8146-4acd2351a3f6",
|
||
"comment": "au moins 2 membres dans la catégorie",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "49a1742a-5cb0-4cb3-8847-34b3652da717",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "60e9ac85-6fa3-4c79-8202-4f3731f25b48",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "95bb3f2c-ffcf-4baf-883e-8a38857de1b8",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "427d7499-800f-48c5-9ccc-42978c99d3b1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "8902ea3d-d6bd-4290-98c5-9bac2d0f3449",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "af6f0b44-a25a-4b66-884e-e4ad1e47e416",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3a95b6da-d2a0-40fa-9b78-e1c3a6b88328",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a0770b1-3a7c-41f0-ac7e-a080d846c12b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0e64841b-3923-40d2-a8b3-0c2dddaddf13",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "779f1ee1-cf59-40c2-818b-f971069bd983",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "nombre de membres sur la page = ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9c99a149-7ce1-45de-a63e-e6d235d81078",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "1baf6e10-120c-43ec-a572-1ff5140871fc",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "8fdd620d-447b-4122-be2a-3a908d4855e8",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fee67cf0-f500-4c82-b724-e7a8739674c8",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "625eb23c-a659-4f9a-8f1a-88e33f123834",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dbf0ae36-18b8-48ea-a665-27a138ae8a11",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "178ac47f-e78b-41a0-a1c2-2f46307f3c9d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "bdda7799-804f-4755-b4ea-3fe26a983750",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "5111d81d-063e-414c-97ca-3334f6420fac",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "206637b0-0b6e-47c7-bffd-7a67602a6581",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "31c08e88-7eff-4b43-a4f3-67fca427f742",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "58019ba1-317d-459c-b6be-6940ee58c43c",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.at(${i})",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "a2c25509-995c-4694-8f38-07f7eb46dc11",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "e1dfa8bf-f6d2-44ef-86d3-6459b3a8c434",
|
||
"comment": "catégorie mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.at(${i})",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "c519db38-1a13-4778-b8ab-886a0735a6b1",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "n=${num} ${numeroAffiche} ${nomAffiche}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "666e71ac-3851-42d2-b266-4a8d1a6e25c0",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "i=${i} ${numero} ${nom} cat=${categorie}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7b8dcbb8-6572-4f62-ba4f-95fff0fadad9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "40ec0b9a-9cf2-4d44-bdc3-31334001f309",
|
||
"comment": "Catégorie non cachée ?",
|
||
"command": "if",
|
||
"target": "${categorie} != 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9203bc8a-d5fc-4a31-9e00-420cb71a8ac5",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "6788d22a-aad1-40da-b1fb-29aeddda7f16",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "4fab279e-5973-4e6a-91fb-d39407661b32",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "ad985ad0-5709-4a25-a31e-557f0c6513ad",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a252f259-7a82-4e86-9af9-3622a048850e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "4ef9d97b-6b5d-40f2-98c7-5bf3737fcc87",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf",
|
||
"name": "4-03 lister membres d'une catégorie",
|
||
"commands": [{
|
||
"id": "d56e4c68-de82-463b-89e7-7ad64f95f9b2",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4d200ae2-3464-44b2-a4fc-d139e7d1674d",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f858b24e-6a6c-4293-a030-457b09457441",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "7781354f-dd6c-4745-86c5-ea49a4fee814",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "99ad8fd2-6491-4e56-9aed-f652ab312e9d",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "36203ae6-1ab9-4595-804e-48e0e579e350",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "0f6329ff-2446-4915-8254-c926951597c1",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "917499e6-fbea-4bca-9daa-8a36b1ebc514",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "83d31864-7e84-4bda-ac64-2ad75c740b64",
|
||
"comment": "Récupérer la liste des catégories",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a79191e-c4c8-4a92-b797-7d7722e1d736",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=.current li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "4b641991-eedb-4176-a37c-4d0a85e5045f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "categories_alpha"
|
||
}, {
|
||
"id": "c0450afd-3299-485e-9eb3-b2ab85daf1f3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "numeros_alpha"
|
||
}, {
|
||
"id": "98e08f06-67b8-4f1c-8239-6a54d0234c95",
|
||
"comment": "Nombre de catégories",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option",
|
||
"targets": [],
|
||
"value": "nb_categories"
|
||
}, {
|
||
"id": "d2d05a94-f4ee-4de3-ac47-214cf2e41523",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "b4271895-cd39-4736-98df-68305fb123e9",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} <= ${nb_categories}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6ab6904a-8b83-4148-bcc9-33eb807aa5c4",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[${i}]",
|
||
"targets": [],
|
||
"value": "cat"
|
||
}, {
|
||
"id": "a6a239ef-4432-4b90-b6da-ef5b46592333",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${categories_alpha}.concat(${cat})",
|
||
"targets": [],
|
||
"value": "categories_alpha"
|
||
}, {
|
||
"id": "a69be34d-71c0-436e-9d54-ff18fbef103c",
|
||
"comment": "",
|
||
"command": "storeAttribute",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[${i}]@value",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "751aae9c-fcc4-44c7-a049-884963981c29",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${numeros_alpha}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "numeros_alpha"
|
||
}, {
|
||
"id": "9d6293a8-63bc-48b7-8808-2aac0f347a34",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "e2283ec0-00fd-4c07-987d-ec96032df8fa",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "00db03e5-1e51-4a28-bfaf-06e1eac26a43",
|
||
"comment": "Trier les catégories par numéro",
|
||
"command": "executeScript",
|
||
"target": "let tab = []; for (let i = 0; i < ${numeros_alpha}.length; ++i) { let o = Object(); o.num=${numeros_alpha}[i]; o.cat=${categories_alpha}[i]; tab.push(o);} ; tab.sort((a, b) => { return a.num - b.num; }); let categs = []; tab.forEach((e) => { categs.push(e.cat); }); return categs;",
|
||
"targets": [],
|
||
"value": "categories_num"
|
||
}, {
|
||
"id": "a7fd532c-fb17-4042-b101-8ea51aaba965",
|
||
"comment": "Afficher les catégories",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "3e85589e-6011-4f7b-9046-79a0163caec9",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_categories}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5e909f07-e8f9-4199-9a82-51048300f5b2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${categories_num}.at(${i})",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "9db7adab-7a4e-403e-bd3b-4837e28aab34",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "385ca0c6-9f1e-47b8-93d0-ddf8c81fb06c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9aaaa7b6-7190-4874-94c7-43c4229dfe6f",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0cd179f-d57a-4bf1-b3ed-9f9f6c6d75a8",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "7cf137db-4fec-4eac-98e4-cca0bf8f9f7f",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "a289aa01-6e01-4bc9-a241-2477117a2232",
|
||
"comment": "Init liste des catégories",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "a36849f9-8eae-47a4-94fa-dfc944b2fd90",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7d222cb4-c94e-4627-a8d5-0226a4f1eba7",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d3905ed9-1492-4301-a1f3-eb2b132239b5",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "73a6e625-87c0-452b-a0cf-50b6fdd249b3",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "bf354704-b77e-4cc7-a95b-db3a3b684fc8",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fcd6e32d-48d0-4b14-8dfb-b38632b44680",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1955755b-3581-4846-9396-e3d725a94293",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "93993815-52df-4730-a581-4ae1df772f44",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "160220dd-aed6-4643-be17-5305c847fa08",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "c1aec9fa-d5cc-4ed5-9091-991ba4c11ac8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "0ab9a590-3f37-4e71-b687-8e8c268228fe",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "de057e1f-599c-4573-bf97-1bc1e81b3395",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "a8d6090c-20ba-41ab-be9e-b7a7b278e500",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "32e43f66-3c46-48bb-b583-fca28a65edac",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9cf6b00f-f6de-44e6-a981-e7bd8f819a7a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "36d022e6-d557-4e37-973f-9fc4adb08a11",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1e6925a8-754c-4283-a774-0999207cd2ab",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "1d77ac00-6edd-4e30-b5ec-2f393133cd61",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "27dfae14-a50c-421d-9863-88ec3f74712d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "6da61310-6df0-4c8f-af2d-ddaf148b9b23",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1b094189-c71e-4862-978f-6fc2604936ce",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "09a257c1-da2e-4edb-9eb6-f316793a5cc4",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc32607b-03ef-415f-956a-f1d85e2ef1c6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "332de2d1-0a28-4ca5-b5c4-d59afa19e7d8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "26809156-4d04-4195-9e4f-7737966f6105",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "cba63ad7-df7e-4c89-8140-677c198ebe31",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b3676664-c6a5-4dd7-a4a4-362a2634bef7",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "8a0862b2-7da7-4051-80bc-3faa5354fe66",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "5ff86d7e-b086-4084-b551-e58e113593ce",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "41808bda-2512-4a4f-b467-a0db3c1a69f3",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "2a0cd4fa-43dd-4fa5-9ab7-a765fc7ef4fe",
|
||
"comment": "afficher fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d4bc3219-01a1-4d73-a633-7a3b874f827b",
|
||
"comment": "Catégorie du membre",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "67eb90d5-427d-4d07-a902-ec4b1afe9688",
|
||
"comment": "Trouver le numéro de la catégorie",
|
||
"command": "executeScript",
|
||
"target": "function getNumero(cat_name, categories) { let i = 0; while (i < categories.length) { if (categories[i] == cat_name) { return i + 1; } i += 1; }}return getNumero(${categorie}, ${categories_num});",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "e7fdf091-31ef-44ea-ad9d-ad09ea767c9b",
|
||
"comment": "ajouter numéro catégorie à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "79d1d84f-6210-4d0b-8754-164206b07cdf",
|
||
"comment": "Retour page précédente",
|
||
"command": "executeScript",
|
||
"target": "history.back()",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ed7f874a-1dd2-405a-85f8-daef27c4b214",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "efb790f8-0464-4565-83a8-b10d661eeb7e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8b9580b5-d8d5-43b0-9bdb-63a4aa1394d0",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b5bc60a1-69f7-445d-ae9d-6401aee0cd90",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6f79f713-83eb-4cd4-bf5d-c0176cffabae",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "c1b83aaf-5ea1-42d6-9a1c-7c485df19be1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d8ed8e81-a1ab-430c-9c96-4c0655e2e53b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "bd195c84-72ec-4beb-a0d8-18ea9206020e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "608e596c-a258-42c3-9b67-6aaf9f24458c",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "28edb89a-5d72-447c-8dff-412f28057687",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ec54e45a-4c2f-4e4b-ae09-e725d148908b",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "f5ee520a-509c-4273-b3dd-129e99a866fa",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "2be794df-410b-4502-bc3d-0d948ce34bac",
|
||
"comment": "Générer numéro catégorie",
|
||
"command": "executeScript",
|
||
"target": "return 1 + Math.floor(Math.random() * ${nb_categories})",
|
||
"targets": [],
|
||
"value": "num_cat"
|
||
}, {
|
||
"id": "87dcb491-ba02-40ea-953c-3d5413b56c6c",
|
||
"comment": "Ajouter numéro catégorie à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.concat(${num_cat})",
|
||
"targets": [],
|
||
"value": "lescategories"
|
||
}, {
|
||
"id": "eece70d4-dfa1-46c9-b546-109a71dc176b",
|
||
"comment": "Sélectionner catégorie",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[@value=${num_cat}]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ebeaf6cc-a9fd-4a12-a113-a7a01387b5ac",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "c27e36e2-4182-44f7-85f2-18d48ad9d90c",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "876ce548-9f68-4016-ba84-fca1e93242ac",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "e42f8cba-842e-4c69-ac79-2018f5411b94",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "4f9e3a44-86dd-4039-8d32-b1368677a09a",
|
||
"comment": "Générer code postal",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "bb59a1fe-60e6-4c3d-a392-a197bd1db369",
|
||
"comment": "Saisir code postal",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "f6b2abcb-8e1d-4b4f-b9bb-9a23e1ec8ff9",
|
||
"comment": "Générer numéro de téléphone",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "aaf71aca-7f4c-43eb-bf32-c867f9006992",
|
||
"comment": "Saisir numéro de téléphone",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "7508b010-f684-4d2d-a483-ead41d0aac6a",
|
||
"comment": "Saisir date inscription",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [
|
||
["id=f_date_inscription", "id"],
|
||
["name=date_inscription", "name"],
|
||
["css=#f_date_inscription", "css:finder"],
|
||
["xpath=//input[@id='f_date_inscription']", "xpath:attributes"],
|
||
["xpath=//dd[13]/input", "xpath:position"]
|
||
],
|
||
"value": "01/01/2001"
|
||
}, {
|
||
"id": "8a1b5ee9-5ecc-4490-b334-0deaabd8a0b7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "7979264d-65d4-4def-93c8-101c70f3a0bd",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "2764d85f-e4b7-4ee8-b671-eca8ef3e7a96",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ebf58d38-6459-4d96-8682-13281a853e78",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "ad068305-bbad-4c8b-9e0f-09ee29762e99",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "05f8b4d1-4836-44c5-b87d-82ebf94aba36",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "31d4e3a3-a702-4a2e-9ff5-bfdfece5194e",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "faa478ea-a005-4883-b711-545ee6467311",
|
||
"comment": "Choisir une catégorie",
|
||
"command": "executeScript",
|
||
"target": "return 1 + Math.floor(Math.random() * ${nb_categories})",
|
||
"targets": [],
|
||
"value": "num_categorie"
|
||
}, {
|
||
"id": "4bb4fbe1-a230-4780-aa3d-e5c30420a551",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e84e5bf6-d95e-42e5-9431-be271a3cc160",
|
||
"comment": "nombre de membres dans la catégorie choisie",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, \"cat=${num_categorie}\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "ede3cb4b-0697-4b51-9cbd-bd2d5ece6aad",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "9e450853-15c1-47f8-bb5a-8fbccf03daa5",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "nombre de membres dans la catégorie ${num_categorie} = ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "78c4caf5-7f2a-4c85-a985-789651423ef7",
|
||
"comment": "Filtrer : catégorie choisie",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, \"cat=${num_categorie}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bd957d5a-93fd-4700-98ec-f40cc7ea396d",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "57849947-9003-4a3f-8293-15389de5d83a",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "952aff21-5099-4f7b-b407-f83969dae7d2",
|
||
"comment": "au moins 2 membres dans la catégorie",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3dc23459-3cc8-4837-97ee-6b9829871cdf",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "ca29eeb5-b43e-4fa8-951a-0ef1fe627584",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "a75c9a33-352c-4268-8083-25f87719185e",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "5c4a41df-cc20-45bd-a95b-0d70433f7aba",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "cebfb04f-538b-4e6b-8795-c7dc82bfff02",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "776938c5-bf86-47a7-947e-f702f5ef4d22",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "95956761-4a75-4426-a47a-38b762c5e1dd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a469eab1-825f-4538-b01b-04106df281fb",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8ffb7d91-2ca3-4114-8e3d-56836a37c1cb",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "e6c1a7a6-af4e-4c5a-b552-cc1c567574d0",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "nombre de membres sur la page = ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cdbcea32-d3c3-4361-a86b-df4e67c43850",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "2877628e-6596-4f33-b9de-f7be8eeb69f3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "f034b1d3-a489-4604-bd30-18d6b91c7722",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "08b56187-4d2f-4242-8cb8-828910810b50",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "be58dd04-4119-468c-b4f0-631be0a68e51",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0589fb6b-3c55-46f5-bd6d-1873ee8ec922",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "4adcb85f-e352-4d3f-9c86-93cbc82b161d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "55203e0e-99bd-4b68-a0bf-7af85e094fb7",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "3d0c62a0-d98d-4ec9-a9ac-c81ad900d41b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "51b4a1cc-2a98-4d1d-abcf-b8c29eb60efe",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "0cc31ccc-c915-4c0d-b650-21be38317551",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "07ac8ef0-6775-4b2c-844e-0b2455e6060c",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.at(${i})",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "6b4ab061-0e5f-4788-a7a4-a7b2ac4f5981",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "a8a0cbbf-6225-41a6-8c79-9dab3b40096d",
|
||
"comment": "catégorie mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${lescategories}.at(${i})",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "b76359fc-56db-478c-9f21-f76e453d7882",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "n=${num} ${numeroAffiche} ${nomAffiche}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "153a2dc9-d3ea-436a-852d-e91e73e276db",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "i=${i} ${numero} ${nom} cat=${categorie}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8db0fac1-9192-45e0-abe9-9cf95d22a7ff",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "4cd42154-011f-477f-abc6-5fdf1fc3d9a2",
|
||
"comment": "Catégorie choisie ?",
|
||
"command": "if",
|
||
"target": "${categorie} == ${num_categorie}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cd29c223-5fce-4859-b329-2498aadad152",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "ea653d4e-6a58-4dd8-85ee-ed20fe8e0f38",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "56191866-212b-4ac5-b734-d9f90450fa85",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "2c3165ad-c5c0-4c26-9066-58098bc1f4d3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "28a9d3ea-bbc7-45de-a8de-1b3318f4d9d7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "7471f693-79b7-4e17-810d-195d48bbbcde",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "2f1dd424-4188-4ff9-ba9b-63c1085b89d0",
|
||
"name": "4-04 lister membres tri nom croissant ",
|
||
"commands": [{
|
||
"id": "e64962e4-bae9-440d-9189-76cd2fa7f16d",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8fc4d07c-4a4a-4ba1-b502-4efdae84cdba",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "93227c14-1dd9-4720-a53d-fee9e3dfeb9f",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "a2d7b0c4-336a-412b-acf4-fd1d2711c847",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6a19498f-fc5e-4917-a70e-ad8632a8aad6",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "8aa29ec9-ae3d-4eb4-84f6-0a741ed0028e",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "9f1f0ced-486d-40a6-b00b-2f52d4d826d5",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f4da4637-660c-4afc-917b-d426c9b11119",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ef65ebfe-c096-48da-80c2-b803809b18c1",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4ab36927-82ac-4ce2-a210-06e94bf58b80",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "e9a4f284-bdf9-4d9c-ac19-d2a64d7039bd",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "d143dc86-7f62-4318-b8bc-ed4088803953",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "08ca6a60-d1a8-42b7-a342-d82982cc03a0",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "239f4280-e9ee-40ad-98c3-3655bdb00a6a",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "45449b12-411c-47e3-bb80-cbf18c7c9a72",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "c3a99808-32d2-42ca-b834-3d76b2a3b565",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b6ca1c3c-a512-4fd2-8ab8-b5d9fc4ce4e5",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "7c192679-bb22-4be6-b2dc-c937545ba880",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "0ccdcc1e-9dd8-4341-8d6c-b2925c352ebd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "5f8669a8-2d5c-4d06-947a-317c385da090",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0fd03bca-021e-4a1e-8621-777ce6aada58",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1f79c618-d024-405a-afc6-59ccf798cf4f",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fb584f9d-9003-435e-a022-a11f9444c8f2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "4b0afe47-a133-4ade-b40f-f444c012d6b1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "5fef2f36-43a9-47c7-bf5d-270bb05e5e06",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "77dc720f-ecca-4afe-8226-fe7aba7a0b23",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "88dadd06-75e0-4867-be31-7c76bb102fbe",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "952a0b02-5931-406a-b0a4-4a24ec5844d6",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "6ea880e7-39fd-4ca2-8c5c-98d77656c159",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "c383ed9e-ff7d-498c-89ea-c59b6c67a93d",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "bed29913-86be-4b83-b139-8ed3df2fb4b3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "55e9d64b-f4eb-46a4-b992-221d50119dd8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1e99dfc8-f50e-47d3-977a-2cdcf0d432f3",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8bdb469c-a5d1-457c-bbcb-8aa766a9860d",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "83d5fd46-5f0a-40d0-acf8-8e20eaeefef6",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "2db011c1-0697-4f86-9bb6-655551b069a2",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "087a4952-fb5d-4919-8a30-e44b81639d98",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "48fab53a-085a-4e52-b30a-bee5c6b659a2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "b2655aa9-b4f0-476f-bca3-f99a9dc74c1a",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b12d620e-05a4-45ac-8360-b9e5251a936b",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "11af7873-5914-46c9-94fe-454a6969e1ca",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "0ac9130f-c43e-490a-a899-8b8c8ef1be92",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "a4ac6c5a-0d98-42c7-87a1-91c5668ef4a2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "48f23123-f0c9-47a5-8651-bf573f9449fa",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "d5be3f05-2703-475f-a740-fd4a8834c9e0",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "46cc72ca-6556-48f8-a7aa-e904ea441a0b",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "bd9724c6-9b97-4696-bd81-9be5defd05c4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "6be72c44-87b7-4985-9aab-e6e86ca81410",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "91aed930-5be2-480f-a064-293104ef5c3d",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "889082e3-5f3c-4096-8274-e915481cee31",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "1fd5a72e-2d74-4d69-8132-6967633ca863",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ea57717b-35c3-4931-8987-cbff8f3e8eac",
|
||
"comment": "Trier les membres par nom croissant",
|
||
"command": "executeScript",
|
||
"target": "function trierNoms(tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros});",
|
||
"targets": [],
|
||
"value": "membres_alpha"
|
||
}, {
|
||
"id": "463f6e21-e4d4-4486-85e3-358d327b0406",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "89ed4246-ad91-4b1e-bb1c-5b85800fc91f",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5918f687-f08f-4a1b-b62d-5331dc89b22c",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "41551d04-8449-4477-b917-23f09e714661",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "8eca30a9-c806-48d3-9139-e635d2e0e8c2",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "23f2868a-9036-471b-a8ae-34dd133ec5d8",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "834f2a2a-4fba-4aa2-bc78-4286b0de415b",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "12f52c5d-2788-4089-ada8-9536aa0eaba9",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "7377c6d0-36e4-4017-96ab-29a975443631",
|
||
"comment": "Trier par nom croissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"identity\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ff6342ae-dcc7-4d66-9405-e732b5c57029",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fc859ed1-b3d8-46b6-8636-4e392a764729",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d5eb444-2bac-43e5-97bc-b5ee41784bd8",
|
||
"comment": "premier nom",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/th//span",
|
||
"targets": [],
|
||
"value": "nom1"
|
||
}, {
|
||
"id": "5098badc-0505-4cf0-9252-0b43e57f167d",
|
||
"comment": "deuxième nom",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/th//span",
|
||
"targets": [],
|
||
"value": "nom2"
|
||
}, {
|
||
"id": "8d077606-6bfa-4957-96d0-d7e66b32b5e3",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nom1}.localeCompare(${nom2}) > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "010b81ec-8d45-42fd-a299-99daa52d2772",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"identity\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e262265a-4b5e-4573-8d76-fcdabd6464a6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c02f5201-8fbe-4890-901a-913df2e001dd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "28f0bbe5-a0bc-4b18-ae41-365d8def70e1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f9c6d8e9-8079-48fa-829e-0982d2a04f99",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "82b7d906-db62-4fc0-bfba-0eb538a88bb5",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "765a5ee0-72d6-4a4d-acd1-417013afaecf",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "52dd5d8d-7e7e-4c2d-8cc0-9f856af1be33",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e1d5d8f2-b7a2-4944-a0ed-9b4772a5e0de",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "eefdb828-4a8a-4a9c-8dd4-bdd99b135c4e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "529e74d2-801e-403d-a508-4d5d5942205b",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "f5e419a5-7d0e-4eb2-a710-39ee95f4ac6d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "37d4e8ba-286c-407c-aa5e-5d708c007d30",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "b63dea9f-1926-4a73-8a74-5072ee1c5a9b",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "4295f50c-5918-4411-88cc-ce0f8a580780",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "14637acf-dcc9-4d5e-8f63-419972ef35be",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "f3b7be45-e0d0-4a06-a82d-18bd402bba71",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "605a9a9a-d3dd-4fd2-9c7c-4b6295ade95d",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "e0497598-6882-4c9c-b13e-156164ccf741",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "9b3afb82-e409-4417-93f1-d425cced07aa",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c2e73b7f-da0d-4249-b433-381e661afaa0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "79eace7a-8289-4998-afaf-e43825e387d0",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "8275ba53-edfc-40c6-ab55-2c9d9d76c10b",
|
||
"name": "4-05 lister membres tri nom décroissant",
|
||
"commands": [{
|
||
"id": "712e0c2b-764d-42e9-bb69-e699da88caa7",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "55ae3184-e29d-4180-b478-d70430138a11",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dd6eeb58-0ee1-4252-bce8-084075728d91",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "7b0cb08b-088a-49aa-9356-fdf4c7776205",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "472e262a-51a3-431a-aaf4-9dbd8aa826fb",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "e28dbbae-a40e-4c1c-90ee-32e24d1d565c",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "76262a25-e86a-4aa4-bf37-905bb3311ee0",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e899ee60-32ca-4d20-ad72-8935fff00932",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "45b18046-7ed8-4fbe-9422-065fb2e662ca",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "320282a6-63b6-4595-bc42-eca645ea1880",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "162e2ba4-7d93-4ae2-af4c-078b52929868",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "5ac364e4-b4b5-4a24-a768-f0c417e13577",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2bce7631-90fe-46d1-98d2-8b19f18fb118",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fae3c40b-b060-4268-9f4a-c60bfdd7e255",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "890ce60e-c2f6-40b3-b100-ff3076fe4a4f",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "7fbb2420-4ab4-4c15-b6f0-bb49d875dfb4",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "744c5628-5288-4013-b3ec-4280056d2566",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "6d494224-814a-4068-9d2f-7803f19cfeec",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "6c4308a6-9952-4b30-8412-0a05c4eb5ae0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "635d0405-fe51-44ae-87d9-6eb7a155bb11",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "09a347d6-4228-4505-a0ea-6ca331d1ac64",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "240d3f42-2e7c-41c8-a16b-4f620c099667",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1122be4f-795d-4ecc-8e80-3347a00280a4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "59d6822c-454c-43ee-811c-718a6063eb36",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c582d908-f598-4dda-a338-f2ebfeeab766",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "7be4ccdb-06e5-4c32-9aba-f8a72fffe9f3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5c9e9fa5-ff56-4e1f-a3cf-d12f47003569",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "2a4afbe4-a4cb-468c-8ae1-7eea6a4b15aa",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "d27e9939-6cb5-4ca8-86ab-6d6f3b3a802c",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "04717d43-c7f4-416f-bd64-b9f7f71079bc",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "1c34f4a2-b805-4f44-80ad-7c6f3ad92e28",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "e24a3aeb-e5a0-492d-9248-9c15685e0c89",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5ad90e0d-f21d-4ffc-9149-c78852d6a456",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "03658004-f495-4946-ab2a-02a417c74ab7",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "32bdef25-d2b1-40ac-b868-f2c833719c38",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "2545fd5e-6aa3-439f-ae89-6e526794a255",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1007574a-577d-4533-aece-7f5ab87c23dd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "2c045ec6-9ad1-428d-9a3a-740f6e08f65d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "aac93a8c-1334-483f-b865-fbc40ec477e1",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "89516e6a-690c-4b6c-8540-d926d72b3b6e",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "7601fd5f-e434-4f70-95dd-d80770f9bc1d",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "df2f64b8-5b95-4350-b513-394aa0d6095c",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "80c21fc3-2805-4998-8f55-22c6a7f5d4e6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "cd3c3d05-b6ca-4049-8896-ba8c62ed55ee",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "bb657adb-0e22-443e-a12a-2c6a825d99cb",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "8102f2e1-4cfd-48a1-ba23-5494eee5395f",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "18f28b3e-c091-4f15-837d-1051901346fb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "60e89f3c-27d7-4530-a3d1-e4d95db7c7c0",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "7a4e12ba-25ce-47c6-a0d1-0ce9b8d28855",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "28e7bdf6-1132-4278-a570-1dee56f1cf9e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "4bb70b19-faaa-4e53-98a1-9cc3fa7ce102",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9d5dcd80-054b-4823-9d89-774f32997fb2",
|
||
"comment": "Trier les membres par nom décroissant",
|
||
"command": "executeScript",
|
||
"target": "function trierNoms(tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros}, false);",
|
||
"targets": [],
|
||
"value": "membres_alpha"
|
||
}, {
|
||
"id": "7beea25f-a0cb-4e72-92cf-b7c74d9d06c7",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e9eeb33e-6d24-4d40-836b-f819a261c090",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0c9ed58a-e141-4adb-884f-00319dfb8a3b",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e5c39212-6dae-48a0-b8e6-385287a40159",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "d14a09cb-a787-49c6-98e0-4ea1407826af",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "3d881f27-9a14-4689-a13d-dde57eea83bf",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "ba4b685b-1a5f-4118-8cfd-6a73ac7beca1",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a1e447e-42be-4049-bcbd-9255922fdfd2",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "8fa1e204-7be5-4749-960d-a8fae8e19f65",
|
||
"comment": "Trier par nom décroissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"identity\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74a1dc51-ac44-4ecc-9d58-7b6264566985",
|
||
"comment": "inverser le tri s'il est en ordre croissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1b946969-cc91-476b-8bc5-997271a6dad0",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b231a60f-6949-47cb-95c0-9912f85e39ad",
|
||
"comment": "premier nom",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/th//span",
|
||
"targets": [],
|
||
"value": "nom1"
|
||
}, {
|
||
"id": "82fee705-6f66-4dfc-9b39-7aa56cb9d5b8",
|
||
"comment": "deuxième nom",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/th//span",
|
||
"targets": [],
|
||
"value": "nom2"
|
||
}, {
|
||
"id": "fb611611-7a65-4046-8d22-1a37919512e0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nom1}.localeCompare(${nom2}) < 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1c2bfac5-bcbb-4e1a-9940-bc508c32af23",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"identity\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "088467a7-2ba8-4455-b433-ee50973eee36",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3f447bc1-7da2-4f22-90af-9b9eac3f0352",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "28bcd1e2-1d69-4e27-87a3-ac4d3c62f881",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "ba1d6af4-c409-4d7d-8ba5-fb79c4ee0a72",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "9e62349b-99c8-4176-b465-aa6cdedccdf7",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b23b638b-e888-4a12-b2f0-6b55de95998f",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "273d492c-67ec-458b-99bb-77d5133685f4",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "14c573cd-990f-4915-9b09-375c4684807d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "3eff0593-d445-4160-a263-3a84280ec588",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "ddef7b2c-1e03-4ecb-b6d3-2002c50c9d33",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "cda4a5e9-1bbd-43e0-a082-adb723153080",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "25ea969c-dac5-4928-80c9-59b9ff3ed592",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "f13d054e-29b9-43e3-aed6-023352260cdb",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "5470f252-f104-4c56-9a1b-4e6e2ce7c148",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "d72c9c26-7078-42e8-8f25-2ccbfe629da5",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "cb41292d-f3c1-4527-8b22-589c6b21adf0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "dff124fe-855d-4ff4-bcdf-9140b20f64a2",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "45759730-c20a-4b07-bf7e-bdcfd973b2e3",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "93ac4172-665e-4df0-a1d1-349eecf4c3f7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "87e349cf-0f38-45fd-8dcf-8b87b73a653a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "403d2216-6158-4b68-ac2d-c89872fa3a93",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "1493219f-1880-4b77-8332-e780660d301e",
|
||
"name": "4-06 lister membres tri numéro décroissant",
|
||
"commands": [{
|
||
"id": "b4719c43-2476-4782-bcdb-d6afeaf420a4",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c4ac34ae-51e9-420c-ac72-5967e863a2a0",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "db0014ea-5955-401b-9d2c-b29752b4257c",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "22cb6c6d-6cd9-4948-8825-77893d53dc13",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "948195d2-7a07-4b46-8e05-5dd73fbc608c",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "5df8034e-fab7-4ff3-a890-008c21d46077",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "8f71fc40-ee00-47d7-8740-c0e711127123",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "24f254c1-a73a-4f1b-84a0-406c1656dbf8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "34bbf9b9-b8c8-4de4-9af5-57d2fe7668ce",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "00b6f17d-69a2-490d-aa2f-5686c51c0a0c",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "4f633efd-47ac-46b9-b33c-f134ef9efdd7",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "bfd17773-a53d-4865-b105-bee5f4ec41a1",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6dcaeda4-deb4-4704-a585-34e16dd66a52",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "af84032d-fac6-40b5-ab6e-a23b9557a3c3",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "f981c425-20ce-42bf-9422-30b5363f45bb",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "cffdc3e7-0966-4335-b82f-7064aa48402c",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "841cc2c2-f307-4ece-9826-ac74379ecab5",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "292703a6-d3b9-47a1-82ef-667f9444f807",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "91a7d478-9a6a-44a0-900a-7329b47a9b3c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "ad68a8e8-a20b-465d-a217-59a1a75090e1",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f7eab9f2-2b19-4f47-bb43-01f164fda82d",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "23c31f6c-9c38-4289-ab97-a2bcf252a224",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "637d6f84-0b09-4a60-9ebb-cfeda6e380bf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "40902c96-83a4-40d5-93a9-f45eb70a865e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c5ac0c14-eab3-4208-ae3f-1bc4e25a5bb2",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "b446d0e1-9ed8-4b09-8707-470266381ff2",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bb0f8996-2acc-4bea-9080-0d79e216dcb0",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "c9bb2cf8-382e-43b6-b06c-8f77a96599a7",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "e0a1aa64-93f0-4d90-a554-2dad9d11b816",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "f574f203-7b0a-40b1-960f-386a08557387",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "a8aeb79e-772a-438a-828b-abd18b555694",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "2d71dc37-7df6-4e47-acc2-9df2612e68f5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "23361a25-8c81-4704-be19-a2546c5253f8",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2511d9ed-e19b-436b-a7cc-bbcef2ab1df5",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cffcb34e-f6cb-4c6d-bb20-4846d80d8ffe",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "89fae739-6ff7-42e2-ae71-245b45f432ae",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b0d3a05-364a-4056-b0c8-d2f66613944f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "795a827f-6c91-4e08-be6f-30dddc6733a1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "1326ce80-47dc-4dc1-afc6-0d8e61305528",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ead69db2-b317-403b-be78-c88e4f4251b2",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "08df2f51-c001-445f-b5f1-a5d3d888bed4",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "5bec4fc0-d415-4576-9e16-0ac5da157edd",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "3ae5ff3a-c8fa-4ba1-8d78-5b78631ef29f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "7123d7f9-3617-4604-a060-17c0c317ee35",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "f336170b-17a3-4f01-b255-58c5ac520b47",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "50de80aa-804c-4662-8796-02405ad5f6a1",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "a8825934-59d2-41d9-852d-348ef64ea964",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "248824a2-ec7a-49f4-94d1-982d60b63538",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "accae3d8-b4c5-4d30-bf36-51213e131a75",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "cdd1ce30-b595-4e85-8b25-f42509b2e669",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "c37bca32-f591-4b5a-acff-4def51827c6d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9b0a12f1-714e-420d-bab8-da4cfe02e867",
|
||
"comment": "Trier les membres par numéro décroissant",
|
||
"command": "executeScript",
|
||
"target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } ordre = croissant ? 1 : -1; tab.sort((a, b) => { return ordre * (a.numero - b.numero); }); return tab;} return trier(${lesnumeros}, ${lesnoms}, false)",
|
||
"targets": [],
|
||
"value": "membres_dec"
|
||
}, {
|
||
"id": "ed0753f7-c502-4c4a-bc5d-11d95d15c178",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c5adca48-61dc-4f20-804b-575a7c152ab1",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e66db7bb-e08f-429b-aa4d-0b358f631bd2",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d698beb2-6ff5-4084-ae93-3824595c27a4",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7554158a-d56b-4196-92cb-3647f6d9efc7",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "eaa88d08-435c-4c15-b2ff-409826357394",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "247de2d8-d615-42a6-a638-1ee22fb8c7be",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "592d2744-fb15-4420-8c29-ea333fbfff07",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "90b282c1-4678-478b-bf4d-6ee502ccf9ad",
|
||
"comment": "Trier par numéro décroissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2207d493-46cf-4403-b581-949bfc4022c3",
|
||
"comment": "inverser le tri s'il est en ordre croissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "48780bc2-f8ec-4b7e-a17d-fa032015087a",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f27bfb06-30f5-43fa-8c46-0774371cf06f",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "072dd107-2bc5-4de5-b086-cf4e1aae77e4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "9f84f192-4e10-4f8a-b61b-8d143a66848c",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "c5807ee5-e5aa-4af3-b6ea-ed925424e610",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "ccfb3057-32e0-42e8-8ab6-625db9842fcd",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} < ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b1f07eb1-33b6-4880-992f-b675c4c976f3",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "71d9b27f-4d6e-4f43-90a9-51d4e1c8e7ba",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2f165a88-6764-4777-aaa3-41c84dfd0b01",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4ee93b41-d231-4ca3-9146-7c62a5dc045a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "9a836195-8cf5-4a89-9e51-46b3c812dd6d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "81959035-a3d1-4aab-8b99-c59c304bb74f",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9520447a-f551-4c25-8c07-7472d41e0864",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "492b0585-19f5-413c-9148-317fd1608a38",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "96984f4a-8a03-4f87-9311-bf16753f5cd3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "8d908dcb-6f2e-44a5-970c-0d09dfe378cb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f644149a-10c4-48a1-8467-2b94b62263e2",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "6289936f-cf31-480e-b0cd-5af2f3312220",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a9856dec-9690-4a28-9a66-417aa971f766",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "d6b6f688-512a-4215-8df2-a73ae6bb9ba4",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "193522ae-e9bb-4efb-9614-6fff2b502da1",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_dec}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "568c2020-8fe2-4672-9658-e30731cca3b2",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_dec}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "cdae6e12-29e2-4c00-b804-9790870ee4a2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "3151b9d0-dbb1-4c9f-8f14-550d76fc2e6d",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "a2e32a9b-97d7-4632-9db7-e5417648d7fb",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "ce46afa2-9811-49e7-aa18-0f5c41653bc1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "cd6dae71-bac2-4af7-a4a4-8022df97d6a3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "43b2b591-b9eb-4954-a69b-6651265e0bd5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "cbd065d0-2d2e-4433-b7b3-756af25bdbf5",
|
||
"name": "4-07 lister membres tri ville croissant",
|
||
"commands": [{
|
||
"id": "eea36b83-460a-488a-8a45-f45fbd2673e6",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "35ce0bde-6a60-49d3-9414-9526f2507ef1",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d3ec06dd-ca48-4d28-ae54-d114ea8795c4",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "fced87b7-e6b5-4692-b012-ab1421486419",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c8045ff3-a7d8-4408-aae8-573bc6da3cd8",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "f54204e9-258d-428f-8fca-ce6866d16fd9",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "89fb031f-c593-4d52-9cb9-91eddd0dfa83",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "00d3438f-db75-48ea-9ac1-3620f46765ca",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0f234f5b-45d9-4fa3-8213-b90a628d23a1",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5327a3b1-72b9-483e-abec-7adabc14e77c",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "e0d81adf-1a4a-4f58-9cf7-e84116c6e7fb",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "adef3b9c-3a67-422f-afb8-0dd1be92175e",
|
||
"comment": "Init liste des villes",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "e21ac69b-04ed-4759-8806-876ac2d2696e",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "59e01e2c-b55c-4115-968d-3043c50470e2",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bbc5e470-2ea0-4daa-b707-11738ea49375",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "2669e537-5133-4268-8842-97a2e71d6784",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "6b3dff88-0c94-4439-80df-d5c7cb12347f",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7c2dee7e-f26a-4a24-9c70-8f0d53b88746",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "3737ec1e-8218-48cd-9298-99ab35a96b00",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "dd186758-0538-41b8-8780-973ab2dca389",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "1a6c7672-c47a-482d-8ee1-2c251e9b4583",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "490af828-8ff1-4382-beda-8d45dfc3cd13",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3d80ab7e-b22c-4af8-bfa9-bc9c59401d63",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bd455a52-d4b6-445f-8615-937118c81dcd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "762020b5-c375-49a5-aa26-5f774997e195",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "0a900b5a-b050-41c0-aa66-2b62958374a9",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "d824caa9-896d-43d2-bca9-30e6ddf0e603",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eb18d1ea-6874-4b74-9b7f-0f43a408bec7",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "79ac6827-165b-45b5-a2ac-2e96461b9eb1",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "25bc8f2f-073c-4a38-94cf-715429942d7b",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "509bf86b-bc88-496a-8a4f-b8ed40e1dbbc",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "56da224d-c93c-4398-8141-b03eaed94106",
|
||
"comment": "ville affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td",
|
||
"targets": [],
|
||
"value": "villeAffichee"
|
||
}, {
|
||
"id": "f3df0dc1-6964-4087-89e7-c26a8751c370",
|
||
"comment": "Ajouter ville à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesvilles}.concat(${villeAffichee})",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "28432652-d08c-40a6-bdc9-92581f14fbb8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "e7b41589-31dd-45ad-964f-98c68a2c0831",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b8c32098-5b66-45c6-b255-0f68fd874256",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "70625fee-1a14-4dac-a4d1-c1805fcb177e",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "788b8e34-a5cd-4809-b247-87f9f6b6bafd",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "68ae9963-fb07-4f4b-87ac-a4394391435a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e20caac5-f005-4b06-8e24-a0f08a8f78e1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "c334ccd7-e39d-44fc-8d79-63e89966556b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "2e7144c4-1453-4fa1-b3ac-2efac92a631d",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c9b2d076-d228-4fa7-82c5-599a7aa25c93",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1eae5cfe-384c-43be-a1f2-f5f8c9e18d0c",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "be1cf777-285a-41cc-a2c5-afba8935e4e5",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "f7fcd68c-52d9-417f-b6a5-52e90ba91665",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "aa67220d-8538-4c40-9c8b-dafac5a80026",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "27bf608a-17a5-4d24-9d5e-2e2314e26881",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "729c45c6-181a-4a20-b92f-17f2538c29f3",
|
||
"comment": "Ajouter ville à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesvilles}.concat(${ville})",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "e769135e-74c2-43ae-8612-651ef52cba60",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "28ce9656-2031-4531-bded-fe63808652d8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "9730c993-6ad2-4713-8863-da9a78127dec",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "cfc6fe5b-4d20-4d10-9cb6-10cb0a61df94",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "54e13ba3-e00a-40bd-b9a9-6864aad12249",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "430c7da0-6187-4f06-9ff9-d4f88623b372",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0c02bae8-171d-429f-8ff7-f8d04a3d0c6f",
|
||
"comment": "Trier les membres par ville croissante",
|
||
"command": "executeScript",
|
||
"target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierVilles(${lesvilles}, ${lesnumeros});",
|
||
"targets": [],
|
||
"value": "membres_ville_asc"
|
||
}, {
|
||
"id": "8036e1a1-014f-4940-8757-204643cdc5c7",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "32921505-900e-45ca-b013-7ff3abd00106",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1dc6e933-c9dd-4226-b82c-c9209ca515b5",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c1dc27b6-41b6-43b7-88de-fbf00af977ab",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7e355eef-115a-45ca-9fd2-7e67156f9198",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "64e6ea21-8527-4051-a20c-488f5a06f50f",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "642a022e-ac1f-40a3-92e3-1e5ba8b6b129",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3363eea4-6fcc-4dcb-bdad-5a9a12a7ffaa",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "f7d620ed-df1e-4ffa-aff9-eb0e11ca6c04",
|
||
"comment": "Trier par ville",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cff1bc15-7461-4c9c-b0f4-90896d5fbcc6",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "01d7602d-9019-4eab-bd55-695d4634344b",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8a59351e-54c1-487d-86ad-42f6cd462622",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[3]",
|
||
"targets": [],
|
||
"value": "premiere_ville"
|
||
}, {
|
||
"id": "f79e4f07-6323-4f7d-b796-2f4e8fc72115",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[3]",
|
||
"targets": [],
|
||
"value": "derniere_ville"
|
||
}, {
|
||
"id": "9ea04b6b-2905-4824-b183-d4f2e1c6599f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "09d8e537-5104-4d65-a38e-f6240657d7ab",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "49dde8df-5374-4718-8f0c-1f85e1756144",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numero1})",
|
||
"targets": [],
|
||
"value": "numero_premier"
|
||
}, {
|
||
"id": "421b45e3-3c5a-4b34-a69c-023da7bcb83a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numero2})",
|
||
"targets": [],
|
||
"value": "numero_dernier"
|
||
}, {
|
||
"id": "d4ae6c0a-bd01-4703-8d0e-64626ed5ccac",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "(${premiere_ville} == \"\" && ${derniere_ville} == \"\") && (${numero_premier} > ${numero_dernier})",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8803b26f-2e93-4ae7-aeb3-f8a3b7767760",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a4016767-bfe3-47b3-b278-4c9ab993391b",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${premiere_ville} == \"\" && ${derniere_ville} != \"\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "95722694-c01a-4fc8-8997-a25fbe4a7457",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "be817e02-2047-4867-88f7-26a557d75704",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${premiere_ville} != \"\" && ${derniere_ville} != \"\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "95461674-5300-4c05-a932-d4f1ec8a7e2f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${premiere_ville}.localeCompare(${derniere_ville})",
|
||
"targets": [],
|
||
"value": "comp"
|
||
}, {
|
||
"id": "adae6520-11cd-466d-83dc-7ef67648e7b9",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${comp} > 0 || (${comp} == 0 && ${numero_premier} > ${numero_dernier})",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b9a1ece-a824-4afc-8d9d-d5b377576b0e",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "257da1c3-247c-4e29-adfe-7208f0acc944",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e603ae64-a67d-4796-b1c0-7d2368361f7f",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b78a7078-47e9-4111-b840-f55a2ba46a07",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "086676a5-6a55-484f-bc6e-4504ebff28dd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "5f9a528f-0757-4c74-8d76-cfbd59578797",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "8921ff00-132f-4f0c-9b17-eb17f7c0c764",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9992c093-23c2-44cf-ae62-ac67c20f6005",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d56db594-abeb-4f7b-bef7-27fe0c29e866",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "969cf147-9d68-4dca-b2f2-4e803647d5d1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "0e4c1636-8f65-49a8-b1f6-e95ae7bfd138",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "a22f551c-0073-4baf-a66c-ec821c658e9b",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "ee0b3167-895e-4916-aabe-cc177b7c5365",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bc0efefd-4f12-4b86-86c9-8f722a9ab00d",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "f2561586-d9d3-4b7c-92d0-cac77e09912e",
|
||
"comment": "nom affiché",
|
||
"command": "//storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "0d82e51e-26ba-451c-95f5-fa66d76bf3f9",
|
||
"comment": "ville affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td",
|
||
"targets": [],
|
||
"value": "villeAffichee"
|
||
}, {
|
||
"id": "e7e38aad-3f41-48d6-b5b0-584371808109",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_ville_asc}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "5b84e05a-d71e-4934-ba23-65e8051db558",
|
||
"comment": "ville mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_ville_asc}[${i}].ville",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "c16c98f1-dac6-459a-8155-0b572e8b8d50",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "b8194282-4672-4fdb-a312-f1a1ab29541c",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "5dc9b5fb-b77f-4bef-b86c-e04380092b2b",
|
||
"comment": "",
|
||
"command": "//assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "2a3764f4-438a-4e1f-8fe2-a2ef95d7f056",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "villeAffichee",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "6ad2421b-1543-462f-815e-a0a96bb0fca2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "71d26fac-913c-445e-9e93-b9d579c3fc82",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "981f425d-66c5-4939-9ed8-d57ffa5b0c5d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "5a7f0fc2-fc66-46b2-a5f6-0d97c61d515a",
|
||
"name": "4-08 lister membres tri ville décroissant",
|
||
"commands": [{
|
||
"id": "2adca38d-1ea3-4cd0-bfec-fc628e607950",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "737e9a28-1494-4147-b8bf-bbd4dcd8079f",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "73c8eb2b-40d4-473a-8626-07a741311e8f",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "212ee57f-6630-4187-a1c4-5f9d735936bf",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "65f044d2-17bc-4876-b845-433d2cb7b685",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "23bbde8d-4f4c-494c-9c83-6eb2353bf1af",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "5921b0e0-5d51-4625-9060-e8dbd1045940",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7b851ff1-736d-46c6-a44b-45af16777640",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "90ee7c7b-8f5a-4c95-858c-2e66d9910bb0",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9df02c79-c077-4bf9-863c-9bcd18ae5196",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "6dc8b579-9693-41f0-9e46-b734955815a4",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "0d8840d1-e4f6-4ec1-986f-06a3fe956bfd",
|
||
"comment": "Init liste des villes",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "0417d01e-25b8-4dc6-8275-736b7d69d2ac",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1ad17670-aecc-4cad-80d2-d7455e84b282",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d8a6143-d7b1-4acb-89a4-28f03bed8bc8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "d7b2d256-fb66-42c5-af3e-7422b92cca86",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "39129d1b-c39b-4bae-9223-70ac0b4bc899",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "06820e63-1f34-4f1f-866c-caca5c1c3232",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "a12ae177-3cb6-4354-b236-da5e4c4b6ff4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "910acc09-f70e-441a-9705-0539aef5f387",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "73cb7d66-2d3d-4cb5-a384-f1441a7f1181",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "aaddbcfa-7588-465d-acb7-82265c0ecfb6",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3445cd64-f0ce-44b2-ad98-a8926cad4360",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9f7e3e94-6d8a-48c1-bc36-51187c93aa46",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "26b2d931-ead3-462e-ad8e-c5d8f7eec59e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "e23f04a8-67a4-4edb-831e-848cbc139715",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "843e6a4a-13b2-4f0a-9704-3043762f3392",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f69384ca-87b9-4138-8e70-e7cc0cd7f90b",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "1dec6f5d-b921-474d-be0e-abfef7eef3b4",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "db73c987-7e29-4e86-ab02-e05be7cec7a3",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "8005d2b5-71e0-423c-b1ca-590310cf5c4f",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "57c9fa14-332f-4d6d-bdb8-61f94b994269",
|
||
"comment": "ville affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td",
|
||
"targets": [],
|
||
"value": "villeAffichee"
|
||
}, {
|
||
"id": "2bd1c5c9-de28-4ce3-a474-bd2ab1331095",
|
||
"comment": "Ajouter ville à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesvilles}.concat(${villeAffichee})",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "a22eb2f8-9db8-4378-a407-52a860ee78ca",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "20734489-00f2-4b23-a95b-7ae765a92754",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9a9120d0-0391-4a29-9460-e2998f9da880",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "033c0f01-eb55-413e-8447-0b3363537f72",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3075ce2b-597e-44bc-8f1b-572333fb08a0",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "be2f471e-266f-4181-afb0-03e66b877c81",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a99ea17d-3a32-462d-b48e-2f49a1970985",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "51e1f97d-bb62-4ca1-8baa-eb6e4a0dea64",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "d1bac523-969c-4299-b63a-19817f095b7d",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a860d28e-b9a8-4512-bdbb-58b25e22a24a",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "43b69119-55c8-403b-9145-33e0eab2bd8d",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "43d62230-c31c-4527-9eb1-df94d15444d8",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "afbe4d86-3c15-440a-86d3-26113aadf2ae",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "16b2f774-8221-4131-8a2c-8d9d1bfe67c8",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "b5639f59-dad7-4164-970b-2145828752f2",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "8d2f09b4-6ad0-417b-8168-2a6855b60a0e",
|
||
"comment": "Ajouter ville à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesvilles}.concat(${ville})",
|
||
"targets": [],
|
||
"value": "lesvilles"
|
||
}, {
|
||
"id": "ea7d2530-5639-4f39-8273-8169cdb83e54",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "ff3c805e-fc05-4479-ad54-a4710b1816e2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "518805a3-147d-45d4-9c20-fd85c0407beb",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "e3c0ec4e-3292-47a3-b28b-f528f0a9a527",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "34907b24-b6b0-424e-a996-328d12f5bb40",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "e93ea4ad-f7cf-4c61-a9de-937f58137e38",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4d827f8c-fc20-4586-ada5-81b6a208f1fb",
|
||
"comment": "Trier les membres par ville décroissante",
|
||
"command": "executeScript",
|
||
"target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierVilles(${lesvilles}, ${lesnumeros}, false);",
|
||
"targets": [],
|
||
"value": "membres_ville_dec"
|
||
}, {
|
||
"id": "50cea963-0984-4735-aeb7-7327ce169087",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "77a1f49e-91c0-4d59-9e41-c0e1dca518c4",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2cc72bd8-97dc-4a12-bdbb-a2e84eb35d52",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ec030de1-caa1-4e5e-8c16-eb0a168b288b",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "715f4a69-c061-4446-95a6-5d6a13ca498f",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "7d7de33a-3682-4c5b-84fd-2457f7d8b4fd",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "eae64af8-25b8-4232-a976-1e530e1dd6ad",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "01d80644-1171-4f0e-aec7-2aee6524270a",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "eb700fcd-a9ad-4f0e-b3b9-e39ad7d96b22",
|
||
"comment": "Trier par ville",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f82dd30f-c9d9-4bed-b1a9-1f7274ce79f6",
|
||
"comment": "inverser le tri s'il est en ordre croissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "65d23448-4184-48e6-b69f-91bfdc1e80ea",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c8846e14-0b3f-4e45-8cfd-91aceb587006",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[3]",
|
||
"targets": [],
|
||
"value": "premiere_ville"
|
||
}, {
|
||
"id": "e30c5ac7-db03-448a-a008-137ab8630ed1",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[3]",
|
||
"targets": [],
|
||
"value": "derniere_ville"
|
||
}, {
|
||
"id": "e3b1badf-b520-4752-9978-b4f2da6732cf",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "3c772754-2d27-45f5-b983-9a6174a29b0f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${nb_membres_page}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "266d3345-5e03-462b-aa91-6432d0b71a5c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numero1})",
|
||
"targets": [],
|
||
"value": "numero_premier"
|
||
}, {
|
||
"id": "47058551-e469-4b86-a017-be71943bb26d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numero2})",
|
||
"targets": [],
|
||
"value": "numero_dernier"
|
||
}, {
|
||
"id": "6cb020d5-e62e-4f07-8498-eabf33fa6b10",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "(${premiere_ville} == \"\" && ${derniere_ville} == \"\") && (${numero_premier} < ${numero_dernier})",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1e82aa24-b9fd-481a-b621-134c05d9fe31",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7c42a817-ae56-4347-b351-918423053ae5",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${premiere_ville} != \"\" && ${derniere_ville} == \"\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2c119af7-6ab6-4cbf-a29a-c395d807a9d3",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "445b6e45-8eb0-49e9-8083-81c17a556e11",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${premiere_ville} != \"\" && ${derniere_ville} != \"\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "637d86de-03f6-476d-ab50-98d883690e0c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${premiere_ville}.localeCompare(${derniere_ville})",
|
||
"targets": [],
|
||
"value": "comp"
|
||
}, {
|
||
"id": "5b967309-fa60-4cc4-bb84-798d6c6e0b6a",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${comp} < 0 || (${comp} == 0 && ${numero_premier} < ${numero_dernier})",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "34f72ca7-2e37-40cf-9503-e3e677345790",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"ville\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "25aa53d3-a6d2-4ced-882a-ae8388cd6c55",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5ba2d9af-aea6-49dd-9671-d66b0080bde1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "837e9c9a-7470-494d-8d01-fed18d58242d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a75aa56c-25f1-4ce3-9eb0-9ce6278508a6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c624c87a-7900-4c16-9cfd-2fcc97b86229",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "be6e8e77-2934-4a1d-93e4-dcfef0dfd642",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5e87b647-5010-4833-a995-23dfa0d7ef10",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8d33d644-ad6e-474e-b7c7-a300b1a7861a",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6b730630-76ce-44da-9f13-e725213d7989",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "541659b3-9207-49e7-9568-f8ce4b44cdda",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "630f7f6a-3dff-4206-a8bd-6d9ad5737e02",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "575b0a80-de06-4081-b0a9-0ad8f23b8e41",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b4384b15-5774-49f1-9627-3d24e57fa503",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "c82a67e3-89fd-454c-bef2-897e3595fef2",
|
||
"comment": "nom affiché",
|
||
"command": "//storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "0b490677-bc5a-4586-bb8f-26a324923cfe",
|
||
"comment": "ville affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td",
|
||
"targets": [],
|
||
"value": "villeAffichee"
|
||
}, {
|
||
"id": "0eecd8a3-4dda-4938-901a-19f1eb497add",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_ville_dec}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "7ede4f3f-814c-4ba0-a421-575b26e183c1",
|
||
"comment": "ville mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_ville_dec}[${i}].ville",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "b5a2a7ed-47eb-48a7-b8b3-c1e9f95dc878",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "66dab4bc-1a14-4e73-95c2-e5a442589344",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "fa76365f-cfa3-40b2-bc14-6a1c8841ac3c",
|
||
"comment": "",
|
||
"command": "//assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "85485983-7abf-4c22-8a72-530155702393",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "villeAffichee",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "14644e54-14bb-45f2-820f-ff614ddfba8b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "30dd102d-c9bb-4598-9144-330d53a0a62f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "95c3b63c-ad4a-42c5-8a98-8472ea971441",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "e6dc8eef-f38a-482b-8128-f46648bffe42",
|
||
"name": "4-09 lister membres tri rattaché croissant",
|
||
"commands": [{
|
||
"id": "42e4d3f0-c60f-48c4-82bd-9864f1517cd4",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "60a485a8-ddbd-4e45-b2e1-ff721fe3c9c5",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f49ba62b-e727-4c50-817d-7c6dec743115",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "4e1c5898-3da7-4f99-8d8a-b19b0066b97e",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c5e73a48-7269-41d7-8953-1fc26f05334d",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "3018e22d-9d87-49b5-a13f-b0650fb6de74",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "9b3b0a7c-50c4-4dad-b4ad-f7bb6bf80234",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b0ee6a00-9ed6-4ba3-acb9-b2d62e83e304",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4b6f8d36-3da6-4b95-ab81-36ad86caed90",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2bc5b846-d4dc-4ab3-a5dc-4e2031891f36",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "2609fb12-74ea-4088-8ae7-80bebb5dccd6",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "a47008d7-6d93-4834-9275-d73c844dc27b",
|
||
"comment": "Init liste des parents",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "8012dbd0-afb3-421a-9cee-c28404674e3d",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ff0e3d75-177e-4d38-bd99-dd5bd8c53381",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "203ce549-b2cf-45b2-bbcc-67534533ea0b",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "1ee9340d-edaf-4303-a2fc-190aeb77cbe7",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "cb11ec3a-fbab-42fd-a848-68fc64ac9ac6",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "48a1fb6f-5e81-493c-8fbe-2e2b0620cd15",
|
||
"comment": "Déterminer le présence de membres attachés",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": "existe_rattache"
|
||
}, {
|
||
"id": "72313121-a659-407d-b9ef-269161698e24",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "0e0436e3-de81-40d2-bd21-2fe0ed884f9e",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "07cf520c-6978-4759-a1d7-6ecd2d787e4b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "13542968-7ef5-4b16-bc15-ef3dd5be343f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "dd0fedcf-c33b-4b14-a318-93c4b9056068",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4024ea9e-ba39-47df-bbf0-439104a75518",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7d9f30e2-3f77-4777-9ccf-e95fec7be350",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cbc6cdb6-377d-45ee-93e2-4f2ae346d44e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "b752acb0-a526-413c-a73c-65020f18741f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "78540ec2-2524-49ef-8dc1-c76926cf9823",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "69aee151-86a6-4f03-bd2b-111c3e74426b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "623e5e61-fd6f-4508-aaf9-3cbc1c9ab8ef",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "01aa845c-eecc-4077-9f30-afcbc057f8a1",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "3f0c452a-4fb3-4962-891f-61f2bf34ce10",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "d947ec69-68a4-4d72-b334-ea72bca1cc46",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "0b2b0cf6-2d83-42d2-8f6f-1f78170bacb6",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${existe_rattache} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b5c37ee2-d858-42ca-baf3-6c222817fb09",
|
||
"comment": "parent affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "a48c363a-74f5-4f4f-93a8-ee50153e39f1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${parentAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "b3d94dec-6436-434e-8c2a-768aab532922",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d9ecac62-1a57-4c60-ab4d-cd63f9ed0694",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_parents} + 1",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "819a5cad-5fac-4e39-90aa-90b70b240378",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d315a426-390b-44ae-9bf9-99f0d78944d0",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parentAffiche})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "b20e9e6c-ed12-43ce-b817-3ed67d01db53",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b4c009c6-f57f-40e0-9828-c93408d60142",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "fa71573e-ecf8-4437-a344-1c58ec6ee50c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "573651a2-2a49-43a7-aceb-4786bf112b6f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "634dd538-aba2-4b61-ba7d-5f404f6b82db",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a6d6d344-f6ed-41fa-a2aa-f8a25ad5cfa7",
|
||
"comment": "Générer de nouveaux membres si nécessaire",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "47e65036-df09-4d0b-8929-db373a9fb890",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20 || ${nb_parents} < 10",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0cac3c8b-a9c3-43f8-8f30-623b957476f5",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "3bf8c3dc-f253-4f0c-b7fb-0d775880d7e2",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0017f3d9-eedc-44b9-9b36-e7f02e273bfb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "4f66fe3b-d3b5-49b3-96b3-2f53765c6c53",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "88b7aa01-4748-4d99-bae0-954885d838de",
|
||
"comment": "Parcourir nouveaux noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a08b2b6e-4a22-471b-8385-50046c02260d",
|
||
"comment": "Membre/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f3f99e73-79aa-4be4-9d2a-7d0ff838e07f",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "3706470d-dfba-43b1-982b-5ca71d515ac4",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "25f4e77e-880c-4944-9174-6370bb0bbe16",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4897dece-0b51-47c0-a91a-62ddb241fc75",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "429e6281-b176-42ae-9899-76eec2b44936",
|
||
"comment": "sélectionner un parent parmi les membres présents",
|
||
"command": "executeScript",
|
||
"target": "function selParent(lesnoms, lesparents, nb) { while(true) { let num = Math.floor(Math.random() * nb); console.log(\"num=\" + num); if (lesparents[num].length == 0) { return lesnoms[num];}}} return selParent(${lesnoms}, ${lesparents}, ${nb_total_membres})",
|
||
"targets": [],
|
||
"value": "parent"
|
||
}, {
|
||
"id": "9e65cb94-4898-4564-a671-7097619e2504",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parent})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "a6b6cf6d-d6bd-41bf-8a0e-b3ca42e1802a",
|
||
"comment": "Rattacher membre au parent",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "999b8c3c-8e8e-442c-bbb7-e27c59efee4a",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b637a23-9ab6-4f2b-a6c7-789994243a01",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${parent}"
|
||
}, {
|
||
"id": "c41862a6-7e97-4bd5-a01a-ec450bec40aa",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "21f097da-9421-4e8b-be39-c20c4af12fc1",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tr[@class=\"clickable\"]",
|
||
"targets": [],
|
||
"value": "nb"
|
||
}, {
|
||
"id": "3c502b9d-5d04-46ce-a07c-69bf655c85cc",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "17b704fb-fc42-42ab-b627-4fb6e5413e2c",
|
||
"comment": "sélectionner le parent",
|
||
"command": "click",
|
||
"target": "xpath=//tr[@class=\"clickable\"]/th[normalize-space(text())=\"${parent}\"]",
|
||
"targets": [
|
||
["css=.clickable:nth-child(2) > th", "css:finder"],
|
||
["xpath=//tr[2]/th", "xpath:position"],
|
||
["xpath=//th[contains(.,'Lambert Paul')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "10c46d48-42d3-4afd-bc13-8fb753d6a328",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eff6d272-f8b0-4761-ac35-1867fa841f7b",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "94e089ad-9dc6-4553-9047-98ae5d18bffa",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "b2518c46-9134-44d5-925e-9a9fe118c485",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "64df2c00-fac9-43bc-ba02-b39984fef6ab",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "6bbbf0bf-5aec-4773-afd2-72afebc5b056",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "656493cf-95eb-46d7-9e15-eda2e53a8f3d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a418fa16-f127-4bef-bb5c-fd5bfe7b2916",
|
||
"comment": "Trier les noms par parent croissant",
|
||
"command": "executeScript",
|
||
"target": "function trierParents(tparents, tnoms, tnumeros, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.parent = tparents[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.parent == '' && b.parent == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.parent == '') { return 1; } if (b.parent == '') { return -1; } let comp = a.parent.localeCompare(b.parent); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab;} return trierParents(${lesparents}, ${lesnoms}, ${lesnumeros});",
|
||
"targets": [],
|
||
"value": "membres_parent_asc"
|
||
}, {
|
||
"id": "aee6536a-c9e3-4fa7-ad95-7fedcfb28b8d",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "058739f4-9f33-4455-9c4b-39773a0b7d0b",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d86ceeb4-71a1-416e-bff7-6862d92099cb",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "22f4e2c0-cfc9-43a5-84ef-fae5f8af4463",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "3f2d8bba-bb30-42bc-bb85-9f8e5d9017dd",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "a31f76d4-26bb-4d25-afa6-ff804e795f44",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_total_membres}"
|
||
}, {
|
||
"id": "caf359c0-4e02-466e-8b8f-beca805d69cd",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4a88bfa1-6850-4c1e-be38-dbc821a7d934",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "95852992-a3a5-4153-b35c-385b237da571",
|
||
"comment": "Trier par parent croissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c7162fb3-35ac-4e49-8ddc-da8855714da5",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d2b1eec6-f76e-411d-bf2a-245499ff8589",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5f7d406c-27f5-4f76-a8d9-b4097b59d572",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_parents} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c725c982-1e45-4768-8b0b-04ef0dc4a525",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//td[4]",
|
||
"targets": [],
|
||
"value": "parent1"
|
||
}, {
|
||
"id": "f8991fa9-f588-4a37-bd5c-a3ad1e1b757c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//td[4]",
|
||
"targets": [],
|
||
"value": "parent2"
|
||
}, {
|
||
"id": "9473ae96-2a7f-4555-aa81-5627b4d821d4",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span",
|
||
"targets": [],
|
||
"value": "membre1"
|
||
}, {
|
||
"id": "20a8bada-4099-4f0b-bba8-59bf4f3337b6",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "539d8f10-6e95-4f91-9e67-57c8e1bf5647",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "1b8c7bd8-5e60-48cc-b4d6-ad69d7007d3b",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "c13e7906-58c6-4732-90c8-06481b2367c7",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${parent1}.localeCompare(${parent2}) > 0 || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) > 0) || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) == 0 && Number(${numero1}) > Number(${numero2}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "316e0656-f265-4e9a-af31-932f3016c781",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "acbcf6e1-2aba-4ef8-849b-231610920a6e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74c3fcb9-640a-41da-b666-f2b3a7898dce",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${nb_parents} < 2 && ${nb_total_membres} > 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eab45a3b-bed9-4cb7-91a4-9755e875de48",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "68ef9b49-6413-4da8-9532-d92cb8e7d32e",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]//th//span",
|
||
"targets": [],
|
||
"value": "membre3"
|
||
}, {
|
||
"id": "fe7e7b9b-4e52-4249-8e67-a65dd4e0f964",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "7887e3f2-b52e-4c0a-b793-246e9b15a00b",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero3"
|
||
}, {
|
||
"id": "1079b2ef-086d-47cf-917f-c85c02e359e9",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre2}.localeCompare(${membre3}) > 0 || (${membre2}.localeCompare(${membre3}) == 0 && Number(${numero2}) > Number(${numero3}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b478c32-dd57-4fe2-9b43-fd7554c8edfe",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6dd75c79-6c11-4fad-8c64-d3692e6324c1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3dd28cd9-42d4-404a-a607-baf479dc723e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fa0d4446-b42a-42fc-b882-cf8e8db8e0bf",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "05d8e8cf-6b12-42f2-856c-79a1d8e13ca5",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "07629c5f-4a3c-4227-a25e-f971d7d11bc6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "fb41d71f-ca39-4882-98eb-a5b9c061af90",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "151b7046-1926-4ea2-8b76-9fff22e1d6bc",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74134716-d7d3-468e-8544-0f9b061a68c9",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6e78ed74-be18-48f1-8b65-19d439d82704",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "1fc92746-07b5-4fec-987a-8c44e896c596",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f02c60c7-f013-4d94-ac44-cb4f9db4e060",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "b8627e09-18da-4bdf-a681-aeb16e0baf38",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dadda7df-0452-4419-98b1-80be213fb07e",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "289585f2-f24b-4da0-92e5-f2df91dd5e49",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "a4f9222f-b0b2-4d68-9c82-4a72eef7d886",
|
||
"comment": "parent affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "f8dbe728-797b-4ccf-8818-824bda5a8de4",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_asc}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "88ead84c-1e37-4e66-985f-b6178e46a392",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_asc}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4b093be5-ddff-4497-93ac-750162617c13",
|
||
"comment": "parent mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_asc}[${i}].parent",
|
||
"targets": [],
|
||
"value": "parent"
|
||
}, {
|
||
"id": "e277d47e-deea-47b9-8ed6-dd74317e9038",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "6c57bd1a-50fa-41cf-bd86-f0c75b7c94bd",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "624d22e5-f8bc-4ec9-9484-0ae7ab59dd30",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "840494f1-98d9-49d7-9c82-56d002af3e31",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "parentAffiche",
|
||
"targets": [],
|
||
"value": "${parent}"
|
||
}, {
|
||
"id": "218040ef-5c71-49a3-b987-c4f2ea151db6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b3a82a7e-0f11-4ff9-aa84-5697048318b0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "909281cd-ded1-440c-a045-58fa5e46c120",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "3d1fc496-8036-4948-af1e-607d5375e813",
|
||
"name": "4-10 lister membres tri rattaché décroissant",
|
||
"commands": [{
|
||
"id": "d1468ab8-2d2c-4d46-9d9e-f2a7e6136fc3",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dd87d0b6-58a9-42da-982d-6aa01a676560",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "058e33c3-6334-45ee-a815-3e7f06b4a0de",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "f1560637-e554-436e-aa23-c0503c2e7e6e",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a894d80c-66df-47b9-883e-d991c1226b2b",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "319f7121-66d0-4ca9-9d56-e2c994f4f0d7",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "493f9bdb-9fcc-449f-bd3f-803e96e61a90",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "527a684d-2367-425f-a8e9-502d1866de49",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "206038d0-3744-4827-b58e-596a294cf229",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "66f6d177-b35c-4dd7-b13b-b27a3dd909c2",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "e4a63f8b-9046-4a2d-ac22-e80c6eccf3a9",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "fc596f91-f4cc-4bfb-9d3f-03e540b0bbca",
|
||
"comment": "Init liste des parents",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "83ab19cd-2056-4868-afcd-4624e191773a",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "50e5c98a-0a2a-41cc-b72f-f5c6b2da5453",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "951c9c99-3f40-4bc6-b4cd-ab8c81167975",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "9ed16c3d-506d-49d9-b392-a5435b8ee845",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "4815f01d-f44b-4e85-afab-85e060325cac",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "441fc68f-710b-4942-bb64-10b95a3cc9ca",
|
||
"comment": "Déterminer le présence de membres attachés",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": "existe_rattache"
|
||
}, {
|
||
"id": "bfbfca04-173c-4e86-b683-a814686e86b5",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "45517ce5-faaf-443d-b2fc-4a1bbba721ef",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "058bab69-5af0-4fd4-8532-4202314e4791",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "3bd8f9a6-1911-4139-856e-7bb208547dd6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "57a9329c-3997-4d40-99cb-8530d4657a94",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1e2b191b-7922-4a64-933e-e06e19d0ee69",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7636b0b1-ed12-4025-a982-0aa6b4dc0c7b",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e32c4249-af89-4a94-81f4-90730dd0080e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "80fd3d98-b2ca-4c67-928d-fac957e3c389",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "dd96c8c2-0eb7-4462-a6ca-e6a270cceb6a",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "4b6e384f-3b2c-4d29-b2a2-fce757f69c6a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f803a2dc-2251-457d-afee-41c0f3a6c36a",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "e0d0de86-3b00-4aea-a69d-e5173b7a8a82",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "4e4d7cb7-5b66-4ade-b867-bc2f4ecabaa9",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "3a2c360d-4169-4627-8f21-54ca04323813",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "72fc596d-c276-4174-b8cf-c30c95ba89cc",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${existe_rattache} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "130dcad6-df70-4533-8ed2-2be7e798523c",
|
||
"comment": "parent affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "95586fb9-f1f5-4fe8-ab73-3aee3d43277a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${parentAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "799a8071-5b06-41d3-855f-3a309ecc5724",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fa9dffd0-fe1f-406c-9bd2-b2a323525311",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_parents} + 1",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "d9395c79-9d89-4eea-b063-c1c7c0373eba",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "afcd4aa4-fc1a-494c-a2bb-7747cb88ab3f",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parentAffiche})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "18d17f1f-b932-45ec-b06f-aaf2f64a936b",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0717a430-fe26-46f3-ae84-39a682f2d532",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "09dcdccb-569e-4ea1-b00e-cab82b5b7d95",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b2371862-340a-4589-baaf-e1b77bf36468",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "aae16e48-6736-432c-9e29-ff2a7a24df1a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f8a6d4c3-f92a-46b6-997e-6e00eda3cb93",
|
||
"comment": "Générer de nouveaux membres si nécessaire",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "62b2cf2e-01c0-478d-a976-cba1c9d4747d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20 || ${nb_parents} < 10",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "da84f826-97f9-4f76-b3e0-24660ff299a2",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "beb55908-2a48-4ec7-be06-6d47ac82d58a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "264ee890-42a3-419f-a44e-664841bd6b8e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "a5246e8e-8853-4c78-a9d8-0266b5271617",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "e34645e3-6b24-44f1-9e40-70999affccd3",
|
||
"comment": "Parcourir nouveaux noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "27b658c6-8b51-4b99-af0e-ef4ba858e8ec",
|
||
"comment": "Membre/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b472ad0e-5422-4efb-abef-8bde0e61be2f",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "6b5fa697-2545-4c03-8d76-4e775c26123b",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "85d1ac18-aae9-4742-bf53-4b8f53550519",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "87a5c66e-6d70-4330-b661-160eadfc98da",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "7cccf611-8a4b-4e31-982f-6546be582881",
|
||
"comment": "sélectionner un parent parmi les membres présents",
|
||
"command": "executeScript",
|
||
"target": "function selParent(lesnoms, lesparents, nb) { while(true) { let num = Math.floor(Math.random() * nb); console.log(\"num=\" + num); if (lesparents[num].length == 0) { return lesnoms[num];}}} return selParent(${lesnoms}, ${lesparents}, ${nb_total_membres})",
|
||
"targets": [],
|
||
"value": "parent"
|
||
}, {
|
||
"id": "37b6d65b-4e89-4a59-a0ed-21f0031ce53b",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parent})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "2e82efb4-69c3-4100-903b-1e9cc074905f",
|
||
"comment": "Rattacher membre au parent",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "9db3c26b-9aea-4af3-bebe-1f275505f970",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3935d128-ed62-4235-9390-e577e975a587",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${parent}"
|
||
}, {
|
||
"id": "3e7099fc-fc0d-4e59-a7e8-0500473ff294",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b637d77-7348-47e7-b7a7-43019f49e51b",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tr[@class=\"clickable\"]",
|
||
"targets": [],
|
||
"value": "nb"
|
||
}, {
|
||
"id": "c3f88691-5fec-447d-a147-989815fdea51",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6a5ba85a-09f1-4761-b8c2-a8b2b5612815",
|
||
"comment": "sélectionner le parent",
|
||
"command": "click",
|
||
"target": "xpath=//tr[@class=\"clickable\"]/th[normalize-space(text())=\"${parent}\"]",
|
||
"targets": [
|
||
["css=.clickable:nth-child(2) > th", "css:finder"],
|
||
["xpath=//tr[2]/th", "xpath:position"],
|
||
["xpath=//th[contains(.,'Lambert Paul')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "12f5a119-e6ac-40ed-a3f2-863658f03599",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a8c7a2f5-b483-4043-9275-b2e5dfc4e70d",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dca8c725-972f-444d-974a-db48e82174a1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "11a5c42e-30e1-4764-b84c-d3b34fb086df",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "deffed2d-3568-4748-ad2d-890e63fa6b51",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "c7619762-a806-4b43-8b5b-2b4d0636286c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "6c408902-a598-413a-ac0c-a432e9dd0c19",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c85e496c-a004-48c5-886a-b14dcca1c06f",
|
||
"comment": "Trier les noms par parent décroissant",
|
||
"command": "executeScript",
|
||
"target": "function trierParents(tparents, tnoms, tnumeros, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.parent = tparents[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.parent == '' && b.parent == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.parent == '') { return 1; } if (b.parent == '') { return -1; } let comp = a.parent.localeCompare(b.parent); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab;} return trierParents(${lesparents}, ${lesnoms}, ${lesnumeros}, false);",
|
||
"targets": [],
|
||
"value": "membres_parent_dec"
|
||
}, {
|
||
"id": "5cf11199-9c60-4e5f-a94c-f1ed064420d4",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "725fc849-76fb-46e7-ae68-49b604679eaf",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7af6a69d-b977-4ba1-a116-81dab3433509",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a93bb09f-5e8b-48ce-b32a-a882ad65e4c7",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "dc922d29-dcf3-4792-80d0-0793ff45b90f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "05603ef2-bf1b-4f18-8662-83f9cd936f60",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_total_membres}"
|
||
}, {
|
||
"id": "d7f81a4c-cf2b-4847-a21b-e914c20dea90",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9bf41c97-597e-43e7-ad67-b29e4fd17244",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "efc0d938-c6a2-4339-90f1-ef9827b6bbf0",
|
||
"comment": "Trier par parent décroissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "563e6c61-4ae2-4322-8740-52016a8112f0",
|
||
"comment": "inverser le tri s'il est en ordre croissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3f1dc67d-b1cd-4ddc-a147-03f22c37ddfc",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c495c1fc-9d9c-418f-bcb5-c72a7b1867b7",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_parents} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1fb96c41-b92e-487d-9685-7c74bea9c0f0",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//td[4]",
|
||
"targets": [],
|
||
"value": "parent1"
|
||
}, {
|
||
"id": "d3ed351b-f067-486d-bf7c-5f67d4727443",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//td[4]",
|
||
"targets": [],
|
||
"value": "parent2"
|
||
}, {
|
||
"id": "ee85bc32-e9cf-40f0-b2fa-3628cf76d53d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span",
|
||
"targets": [],
|
||
"value": "membre1"
|
||
}, {
|
||
"id": "08480205-ca0c-458c-b882-03dc3decdfdc",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "afc53100-5828-4a05-8fb9-5899ae16c124",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "8796aacc-765e-4bfd-bbd1-fe52d657c25c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "0183a571-1576-43aa-8140-dab6fc90c664",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${parent1}.localeCompare(${parent2}) < 0 || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) < 0) || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) == 0 && Number(${numero1}) < Number(${numero2}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bae9146e-92fe-4f55-94eb-dddbc4ff92a2",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7dabd4cf-806e-4b12-91c7-9fd13ebe5e4e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d8ae5ba6-269e-43f4-8bdd-2622ce83dd41",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${nb_parents} < 2 && ${nb_total_membres} > 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eafff0d1-e42d-4232-8757-522cec8c4813",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "f75aefbe-a4f6-4daf-a5cc-0a887f4d5d81",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]//th//span",
|
||
"targets": [],
|
||
"value": "membre3"
|
||
}, {
|
||
"id": "7c035558-b785-477c-af11-39a580df9e49",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "f6d5f6b5-373b-46e3-bd3e-3973e5c07e88",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero3"
|
||
}, {
|
||
"id": "1b76edbf-dbd8-4cc3-a67d-ae4f50f270f0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre2}.localeCompare(${membre3}) < 0 || (${membre2}.localeCompare(${membre3}) == 0 && Number(${numero2}) < Number(${numero3}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5149ba9b-8169-4c83-855f-0dedd6afae1f",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9a49c432-0439-42fa-a02c-5fab72ea8545",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "af19c0c8-be75-45c1-ba82-5235811d94fc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5f928fae-fb0b-4fe1-a213-d7eb5ee34c02",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e8b68e84-55cf-4734-9c2e-b9fc9e806583",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "d47765a2-04b8-445e-ae3a-f8342c978b56",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "a9322622-903f-4ca3-883d-c012c6764507",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ec1f3daf-a114-47ff-bfce-541f1976f5a6",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2aae1cdf-ec33-4e70-af6d-5d8c0f3937b1",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4239ae59-ba31-46e5-a409-d501e9cd5f29",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "a477027a-1239-4dc0-8f51-a10197932586",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "7d945625-631c-494e-9d83-70d5d120e0e3",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "16885068-e8ae-477f-b092-2e02abe5feb6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5a8fcf9e-5d3e-4f02-a6a4-30eef3640ca9",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "4c5cdd03-0e71-4c17-bddd-cc249f9f2976",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "cf281544-86c2-49ad-926c-f4974beb72ec",
|
||
"comment": "parent affichée",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "26cbdb1a-c2b1-4762-96a8-bde6e33fef1d",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_dec}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "75028fcb-ab4e-45c9-83d5-3ebf04aa8d37",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_dec}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ec8a8094-ae99-46e7-88bd-9ba2e80ce843",
|
||
"comment": "parent mémorisée",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_parent_dec}[${i}].parent",
|
||
"targets": [],
|
||
"value": "parent"
|
||
}, {
|
||
"id": "2172a3c2-2926-45e0-bbc1-3d1cae2565a6",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "n=${num} ${numeroAffiche} ${nomAffiche} ${parentAffiche}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "570fda81-5863-4247-8064-7af915c8a067",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "i=${i} ${numero} ${nom} ${parent}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5409fdaf-c3b1-4972-9ecf-ac47d0fba6b3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "aa25b643-e68a-41ed-ba46-b2ef3b099539",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "03742f95-5a6e-4daa-829d-f4f24bf21a6d",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "f002813c-ef1d-49f8-93e1-7f379f23a707",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "parentAffiche",
|
||
"targets": [],
|
||
"value": "${parent}"
|
||
}, {
|
||
"id": "52e57ccc-9843-40e2-83f9-302778388baa",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "375236e9-5241-4a53-9409-d7b0979c5dfb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "2eaa3dff-62e2-4fc9-8041-3aaf4c7de54f",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "2d33e4b1-0a99-4c1f-a6b8-154362a00c66",
|
||
"name": "4-11 lister membres responsable croissant",
|
||
"commands": [{
|
||
"id": "f7411ca5-97f5-4725-9b7c-6623cc1c38c9",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "73c1f610-4af2-4921-a9da-7d1c9f6f9950",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ec7463a3-6c21-4584-ab52-a7c3081ea809",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "9762ab4b-3af6-4212-bbf5-bb5c7dd28e76",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cd763f26-537b-4401-85b9-e8f33f2748cb",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "7f831eb3-42b7-471b-92e6-bbf92f23bff7",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "9a785339-9074-4653-9b17-632ddcb9a700",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "318458d8-75c1-43ae-9d4b-0277d1e23350",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "71fd2de7-7557-43a5-a22c-bbc5001628a3",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f64993d2-1f86-4a6a-8cd1-24e6aeed35b9",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "185ec718-cb77-4d73-9159-02d22ff3ec08",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "7a98cdbd-3576-47a2-9ca4-c2eb74ee844b",
|
||
"comment": "Init liste des parents",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "84d72b14-0485-4a12-a97c-ee3143b823fc",
|
||
"comment": "Init liste des responsables",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "ac6dedb1-43e5-44a0-89d5-cb39580af3c0",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "88b73d78-8d65-4e7c-afac-7ecd3f0a1eee",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "62378d96-da55-4c22-ab1a-3eb2091d2e10",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "0fe70227-e95f-47d8-ba03-929c1675b7b6",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "6007b4f9-202e-471c-9981-317060378aa6",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bb222a8e-279a-4a67-8c90-614e7dde6f05",
|
||
"comment": "Déterminer le présence de membres attachés",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": "existe_rattache"
|
||
}, {
|
||
"id": "71c37591-da87-4471-848c-a95af269067d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "a8565be3-d5a4-4427-9d72-126b5de464e0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_responsables"
|
||
}, {
|
||
"id": "ceeaab00-74bb-4f2e-9054-cd5cb3ddd746",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "bcd68921-9e45-4c73-8363-f4c02603b965",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "d4b5faa7-3d64-4dfa-bc42-59ffb92cd467",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "c0620443-a5c9-4518-bef0-0117f62d1e6f",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9bf98d54-6a79-4551-9113-29422c05337b",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f87d480c-54a3-491f-a029-de37f22d9887",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "87bc6e75-5a8a-4559-a97e-e12dab36bd06",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "809f2cd4-6ca8-4efb-b1ab-652334671b9c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "1293995b-e614-49a6-841b-a2a194baa813",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "6f592bc4-b9d5-4452-af7b-5c488cee7675",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0c1b26ca-40c5-4b24-a7cb-c81757409730",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "343f99a8-5e00-4996-9804-bdbdb1a1e56f",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "ab2cba33-3f4f-4231-b7d2-aaf4e0c856a6",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "ff56cbac-4cff-40a4-9ab2-b844e54d273f",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "b0007505-c59c-4e8f-b922-1930c52633cf",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${existe_rattache} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d4b241cf-9ace-4b60-add4-9baee2c291c7",
|
||
"comment": "parent affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[4]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "926bdc90-a3f3-4d32-a6b7-b3f395851f3a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${parentAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "6fad5f16-f6e9-471b-87a4-ea428bf97876",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "462ffc37-d6d9-4d49-b68e-85092d8bb242",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_parents} + 1",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "de5aaa99-a2d1-4796-91cf-7a9d7429709c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d71b8414-0040-468d-a0e1-e2c5fafbe798",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parentAffiche})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "440b9a89-f48b-4045-809d-948b6fd5527f",
|
||
"comment": "responsable affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[5]",
|
||
"targets": [],
|
||
"value": "respAffiche"
|
||
}, {
|
||
"id": "868ad12f-ad4d-4d00-af08-c77b98521ba9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${respAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "98f6eb2c-583e-4b49-a35c-eaf48010beba",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "56806d2e-8022-4a93-893e-c5e2f83e3f73",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_responsables} + 1",
|
||
"targets": [],
|
||
"value": "nb_responsables"
|
||
}, {
|
||
"id": "8356efc2-fe59-4551-aa1b-38e50c663051",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b160c174-72d7-47a7-94f3-7e9b8a04cc53",
|
||
"comment": "Ajouter responsable à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(${respAffiche})",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "746ddf14-18bf-470f-9bbe-351bec86f5ae",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "37d2205b-6d44-453f-bd04-e60bb8d71ca5",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "4fbd11c8-dbc7-4c84-8151-0de8dc26765c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "97fb8b08-c556-4035-a34c-7caa2f01d6b7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c2f4dc05-250c-46a0-a5ed-30ee72e48d04",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "e9570f2f-f347-4b56-a707-751255e6b52d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1fc8f2b3-1e93-4a7c-a65a-6e380c081b28",
|
||
"comment": "Générer de nouveaux membres si nécessaire",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7f67aa81-4ea5-45ba-821c-d30ee710e80b",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10 || ${nb_responsables} < 5",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a1fa3c06-f29e-47e6-92c8-26628215623d",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; const nb = 2 * (3 + Math.floor(Math.random() * 8)); for (let i = 0; i < nb; ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "484edcc8-8aaf-42ad-bfe4-16f496efb1a3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5a5eed42-6eee-4890-a4f9-4b35609d3f84",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "d4ef89db-a8ce-44fd-8a33-3bd5642b4806",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "1d77c57c-73bc-4cc5-b353-1e439731c357",
|
||
"comment": "Parcourir nouveaux noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "316f128e-1ab7-441b-b8ad-4dbfae1dca3a",
|
||
"comment": "Ajouter un parent",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e5126502-ce05-469d-846a-3251e82287dd",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "7447796e-3535-48c2-907f-640eab9b419c",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "1db15305-ef13-4cdf-88a3-b116182a8882",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nomParent"
|
||
}, {
|
||
"id": "64fa1451-f16c-4eb7-adbf-ab5d6c87b12f",
|
||
"comment": "Ajouter resp à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"Oui\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "3d630202-9f9d-4c51-b987-5732f0934822",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${nomParent})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "99f793e5-3888-4d1a-863a-452680d9d40a",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nomParent}"
|
||
}, {
|
||
"id": "eb8918ad-5257-4cd5-a461-f3b1be7cd56a",
|
||
"comment": "Enregistrer les infos du parent",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "86944500-8352-45f4-84cd-dcb66e578092",
|
||
"comment": "Ajouter un enfant",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "93301bb1-74cb-4fa4-a208-b0ff119f236d",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "f789d9ff-e40c-4226-9057-fdf966af6b56",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "b613ca20-16c9-49de-b530-01f26eb0743a",
|
||
"comment": "Ajouter resp à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "0e07ecdf-c159-486c-b576-ee18bca302cf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i} + 1)",
|
||
"targets": [],
|
||
"value": "nomEnfant"
|
||
}, {
|
||
"id": "6a692456-c0d6-4527-9b2d-221aeeb05e53",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "9f6949cb-e712-4f76-ab51-80fe10c83991",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nomEnfant}"
|
||
}, {
|
||
"id": "61f772df-cabd-4a0a-86c6-14a9ca6db9fa",
|
||
"comment": "Rattacher membre au parent",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d0804f6-4f88-4d8b-989c-af5a8732de2f",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "955802f9-5deb-4e9d-8e29-1ef932cb89b2",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nomParent}"
|
||
}, {
|
||
"id": "090ff49c-bb3d-42da-87f8-52b1857dc88c",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b6e7455c-14fa-4965-b54c-c8e73688dd9d",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tr[@class=\"clickable\"]",
|
||
"targets": [],
|
||
"value": "nb"
|
||
}, {
|
||
"id": "a4cf17ea-8ed6-4085-a5d4-55960e286f62",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6b10ca06-b122-48f8-93b4-cfc1465dc755",
|
||
"comment": "sélectionner le parent",
|
||
"command": "click",
|
||
"target": "xpath=//tr[@class=\"clickable\"]/th[normalize-space(text())=\"${nomParent}\"]",
|
||
"targets": [
|
||
["css=.clickable:nth-child(2) > th", "css:finder"],
|
||
["xpath=//tr[2]/th", "xpath:position"],
|
||
["xpath=//th[contains(.,'Lambert Paul')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "93f2ded9-6a20-49ec-8c8d-87d816f73165",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6afa0ad8-ae7d-493e-b8ba-257a36216b14",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2dc1dd17-8714-4ead-85da-6bbb39dba02f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "8785e2c6-eea3-4037-a0ce-3a668638ea38",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "5dd7d379-932f-4c57-87e4-c86e4cf9fed0",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e950601b-c39d-43d1-817e-f453463351e0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 2",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "f568a07b-b6e3-4380-a8d1-ee3b5ecf51f7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2d1f0fc7-53d4-4da4-8979-90f0f691acdc",
|
||
"comment": "Trier les noms par responsable croissant",
|
||
"command": "executeScript",
|
||
"target": "function trierResp(tresp, tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.resp = tresp[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.resp == '' && b.resp == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.resp == '') { return 1; } if (b.resp == '') { return -1; } let comp = a.resp.localeCompare(b.resp); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab; } return trierResp(${lesresponsables}, ${lesnoms}, ${lesnumeros})",
|
||
"targets": [],
|
||
"value": "membres_resp_asc"
|
||
}, {
|
||
"id": "40a67fad-f745-4cc5-bc36-d215008028f7",
|
||
"comment": "Afficher le résultat du tri",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d36edb9-72c4-46bf-8a3e-5bcfb578b74b",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "49df81b4-b216-4d3a-b313-5710adcd3e2f",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "707f9554-5ac2-4141-ba79-7f7ca0734e0b",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "35df3e99-f034-4506-b82d-2f4bd624b60f",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "ec788f82-7335-4feb-80f6-06459e33fa6d",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "49ffe18d-8c3a-4b35-85e1-27e12a26ade1",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_total_membres}"
|
||
}, {
|
||
"id": "d6161ce3-9eb4-42c5-b68d-abc65d212ab9",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c6dc61ce-8f44-4817-99b2-499cfae531a3",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "f9f07cd5-b696-4a5d-b501-8ea1e90ac1b7",
|
||
"comment": "Trier par responsable croissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0a16eba2-fb2d-43f8-b232-0971bff962f2",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "97f4f418-3bf7-4dfe-8573-4e9fb2c0842f",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4da7a7d7-c996-46eb-8ecf-a74d94572788",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_responsables} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6658e51a-5800-4495-9f57-8d2670f6e350",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span",
|
||
"targets": [],
|
||
"value": "membre1"
|
||
}, {
|
||
"id": "75fb2bf9-294b-4bc7-ba4f-8ac09f2aa4b8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "402b9459-2fd4-4bea-b1d5-9f6f7b75941d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "2eaf08d8-7b7b-4d95-b9c2-4ae5541869a3",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "f420d90b-cd7a-4ff5-9a19-104ca7e00602",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre1}.localeCompare(${membre2}) > 0 || (${membre1}.localeCompare(${membre2}) == 0 && Number(${numero1}) > Number(${numero2}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f96e5978-956a-4487-8928-d56e455818a2",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "da00ad35-054d-46e5-b7e2-648bbe361fce",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "69428dbe-2f80-4553-bad9-e099a696a9d8",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${nb_responsables} < 2 && ${nb_total_membres} > 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d09df65-22b2-498f-81b7-dbea3e2550be",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "ec71954d-15f4-4717-966d-a40576b54118",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]//th//span",
|
||
"targets": [],
|
||
"value": "membre3"
|
||
}, {
|
||
"id": "cce231c4-5c6e-401f-adbe-4cbb61d629a4",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "c9bb0a33-c8af-4dfe-b2e6-baf25589533f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero3"
|
||
}, {
|
||
"id": "19f55c2c-d5fc-40e2-9288-79c2129a3cbf",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre2}.localeCompare(${membre3}) > 0 || (${membre2}.localeCompare(${membre3}) == 0 && Number(${numero2}) > Number(${numero3}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3964e123-7cf6-4ff4-ae49-742c7417a191",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "77801309-aa41-4c86-85b7-4cfc26797c2f",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "686e49ef-dddf-4ace-bea5-e2bc7b0a425e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c2f9fdd2-d705-4299-b94e-d699eaa8b716",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bf54c36b-82e1-44de-8428-68ed4aad4468",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "64ed81cf-c926-45ec-8716-f1ddb09fca17",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "43215455-1c3c-4df6-b6c1-d2ac5fce5df7",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a43fceec-b203-4da0-ae37-69ea85887b8f",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "64e7fe10-2039-4939-b9bf-d55eb108cdfb",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "93508fbc-77f2-4a82-ac3b-66ed7cf7d6a1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "6ac5f000-4533-4cac-aa54-26ac7229752c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "03f4bd1f-5d77-40fa-bc8f-83605c9c3ef3",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "fd9df069-11ba-4f56-866d-b5c0e83280aa",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "959f538e-b0ef-4eb1-b91d-c1f76eed2819",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "97f2d9f1-14e2-42e5-8921-ffafc49721a2",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "1135d1a3-bc2e-40f1-8c89-0d6daaf4452f",
|
||
"comment": "responsable affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[5]",
|
||
"targets": [],
|
||
"value": "respAffiche"
|
||
}, {
|
||
"id": "eeca502f-0667-45ea-8d42-b7671bde5117",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_asc}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "9bb92757-6919-4792-b9db-11ecc90bb3a1",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_asc}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "33f56477-6c3f-4de4-9363-7f843f1cc394",
|
||
"comment": "responsable mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_asc}[${i}].resp",
|
||
"targets": [],
|
||
"value": "responsable"
|
||
}, {
|
||
"id": "2c859ebf-4dd1-45ed-b2d1-5ab882abfff3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "238c4e33-f76c-425a-8bcd-f4d5ea367284",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "25004bee-d1d2-4d13-b34b-ac8bf8c26fd8",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "748788fe-2fb8-45a3-85db-cebe061b840a",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "respAffiche",
|
||
"targets": [],
|
||
"value": "${responsable}"
|
||
}, {
|
||
"id": "b4ea2b3b-85fc-41e2-acef-cb012f7313ee",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "7bbf5a8f-cb53-458f-a7ad-ca49dcda416f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "6c90acce-df5e-4adf-a020-36d5dacb90ee",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "06e32c55-bd03-4164-8dc4-c3f36e39575d",
|
||
"name": "4-12 lister membres responsable décroissant",
|
||
"commands": [{
|
||
"id": "095dec70-5f5d-4aa4-9346-814b70e632da",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "535162ff-9892-499d-b190-ad02851346a4",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5e9640bc-7a61-49f1-ae0b-8fb117c81a5c",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "c7049858-0a74-46be-937b-22ac2de0aa2d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1f903bae-5cef-40ef-8e38-0c2c7ef90d62",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "ed1cac99-e8f9-406e-9d85-425768b4afda",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "3491f37b-557c-40bb-b7c2-94f7e682a13b",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "15287fcc-d24d-47c7-a3a0-c36c1bfadf48",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f51b969e-8fd5-4702-a56e-7f46c42f8843",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9480f251-94f1-42fc-ae9f-c8b01d40b7d3",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "09a258db-f411-4e6a-8f3e-fb6a634fd184",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "c165cfec-7edc-4247-8a33-e1c2fefd9d6d",
|
||
"comment": "Init liste des parents",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "ac32bfd0-f3f5-4fba-9cc9-f3cb7b5ec50d",
|
||
"comment": "Init liste des responsables",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "0f02fe19-66df-41b1-82cc-7166e2817ddb",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fc99581f-ed53-478b-b325-86effeaa2f6a",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6fbde4df-7354-49f9-8ee9-049135cf6ab1",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "2a8d6ae8-be87-4ec2-abb7-2775aa90c2d1",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "b235adc9-c4fe-463c-bb57-5235168e930a",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4fc0481d-9238-4958-a2c1-47b0f6793261",
|
||
"comment": "Déterminer le présence de membres attachés",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": "existe_rattache"
|
||
}, {
|
||
"id": "cb838759-1453-497f-a0c2-ec08617f0900",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "1a6f034f-63c1-4ce4-8de5-9bed94b52596",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_responsables"
|
||
}, {
|
||
"id": "4a4c564d-5221-4233-a992-dad66e8485bb",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "2ef90c57-934f-4175-87c5-e5a8401522c9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "9dac13f6-c9d5-4416-99ac-7ce29c381ac4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "cc07942f-5ab1-491b-b5ba-367a530e4ffd",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "83dc03a2-8e7d-41b3-b0fc-cca62d44cb02",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "19538b11-375c-43e1-ab9e-fa1136e6e1ad",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "572f821d-9e9c-4577-b579-18b6579d663a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "298d66e4-073b-4826-af8f-c5947c6372d9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "bf0ff72e-086a-4f48-9272-d5ac0d7afa96",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "bdfcbc5d-34d2-4fc6-874c-b73f73659a92",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d3bbdf34-a69e-4d9b-849d-c30a8e379e07",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "5be3a912-a4c5-40ec-8bcf-4f43ab7e9b52",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "7371bae6-9c03-4233-bf33-fe19bb4a76b2",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "02bcc758-8a79-4b73-bc0f-ac59eb6edac0",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "131682a8-05d8-41dc-9fd0-57d2a0d46163",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${existe_rattache} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0a93dc10-9657-42f5-97ee-943a57a29dd0",
|
||
"comment": "parent affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[4]",
|
||
"targets": [],
|
||
"value": "parentAffiche"
|
||
}, {
|
||
"id": "dc495578-06d2-4ba1-83cf-24414c92f75c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${parentAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "5f52bc2d-eea7-4d68-8213-34e9c6b76c30",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "86d7a1ed-e4ff-4dff-8b28-566ffbe918ea",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_parents} + 1",
|
||
"targets": [],
|
||
"value": "nb_parents"
|
||
}, {
|
||
"id": "c5e60141-c4bd-4c51-9b28-7f7ae3b613d1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f7c4334f-90ff-441f-b030-c1e4a4675d1e",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${parentAffiche})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "79c82f98-ee38-4c46-8814-3369c8ca199d",
|
||
"comment": "responsable affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[5]",
|
||
"targets": [],
|
||
"value": "respAffiche"
|
||
}, {
|
||
"id": "3b6cc21b-7785-4b11-98f5-7388f4b2a0c1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${respAffiche}.length",
|
||
"targets": [],
|
||
"value": "lg"
|
||
}, {
|
||
"id": "cf737983-c5e8-42a2-aa7d-12c453640e93",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lg} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7cc14b79-10c6-4d2b-ab7b-7048f05e9694",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_responsables} + 1",
|
||
"targets": [],
|
||
"value": "nb_responsables"
|
||
}, {
|
||
"id": "a553e069-261c-490a-9caa-c24670761805",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b631607b-5049-41f8-9c4c-50dc3a2009c3",
|
||
"comment": "Ajouter responsable à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(${respAffiche})",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "896e0a6c-e396-4ae7-afac-3359f4b321c6",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "915c9a5e-97f4-43ac-a40b-353129b18cc0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "08edf336-b0e5-4dbf-92b9-186dce8946db",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "520423ab-5292-483b-a819-c0b0a1b1f7c4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7602fb03-3f99-4efa-ba0a-5ba35b9801bf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "466edb78-3153-4708-8a9c-849fb5ba85c4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f7b3b0bb-3abc-4bb6-a134-7ac827ff9282",
|
||
"comment": "Générer de nouveaux membres si nécessaire",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2571717f-e9e6-4783-b46c-cde453b67156",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10 || ${nb_responsables} < 5",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "20f6e0f4-41a5-4a59-9de9-c8cbb831866b",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; const nb = 2 * (3 + Math.floor(Math.random() * 8)); for (let i = 0; i < nb; ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "267790fd-e665-4e43-abcc-9f0023f2ddac",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "21374e41-6ee2-433f-9b06-efaecf0f0f7c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "d5e48a67-f619-40e0-8359-e79238a14505",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "6618c3de-604c-4664-99e2-115c69a4fd56",
|
||
"comment": "Parcourir nouveaux noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a5ad472c-7beb-42c0-9194-393e2c0f8685",
|
||
"comment": "Ajouter un parent",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "56be0186-f115-47c9-9a22-30d16c0fcda3",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "5db5948c-c428-4d60-a52f-ff342695a679",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "fe291c22-8164-4c39-ab11-16add7f259f4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nomParent"
|
||
}, {
|
||
"id": "6abdcb5d-f160-40b6-a1d9-3aad1e7c02af",
|
||
"comment": "Ajouter resp à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"Oui\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "e5d2ba00-1190-4965-b383-3a6e45a6de6d",
|
||
"comment": "Ajouter parent à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(${nomParent})",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "0357ab5a-4592-4d1d-b0d4-039408be04a9",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nomParent}"
|
||
}, {
|
||
"id": "4367746c-10d0-4cf8-8cce-d004844a6f25",
|
||
"comment": "Enregistrer les infos du parent",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f4384ca1-7a41-467b-bd6e-61baee537c25",
|
||
"comment": "Ajouter un enfant",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8b6bac15-0597-4189-9ae6-adc014a79f14",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "7592facc-4da1-434a-8f32-e8d7263558d6",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "5ddfcc49-0398-4dd9-909f-dd099d699cf7",
|
||
"comment": "Ajouter resp à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesresponsables}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesresponsables"
|
||
}, {
|
||
"id": "1588f7d5-f493-415c-8906-e4b52736bd75",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i} + 1)",
|
||
"targets": [],
|
||
"value": "nomEnfant"
|
||
}, {
|
||
"id": "b164d33d-c20e-4cc4-a3a9-f53ed695f51f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesparents}.concat(\"\")",
|
||
"targets": [],
|
||
"value": "lesparents"
|
||
}, {
|
||
"id": "785a486d-71da-4337-821c-1e84e7247a54",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nomEnfant}"
|
||
}, {
|
||
"id": "4cc2f48f-9afd-4437-a92e-5a4117afcd31",
|
||
"comment": "Rattacher membre au parent",
|
||
"command": "click",
|
||
"target": "xpath=//span[@id=\"f_id_parent_container\"]//button",
|
||
"targets": [
|
||
["css=#f_id_parent_container > .icn-btn", "css:finder"],
|
||
["xpath=//button[@value='http://test.paheko.localhost/admin/users/selector.php?no_children=1']", "xpath:attributes"],
|
||
["xpath=//span[@id='f_id_parent_container']/button", "xpath:idRelative"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Sélectionner')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "cb3d2ce2-f753-407e-bf78-48ffafa084fb",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "922021ef-e8a4-4d8d-ba1b-e7bab815cb72",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=q",
|
||
"targets": [
|
||
["name=q", "name"],
|
||
["css=input:nth-child(1)", "css:finder"],
|
||
["xpath=//input[@name='q']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nomParent}"
|
||
}, {
|
||
"id": "33e63e5c-e199-48c0-8960-bbd7946ed274",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//input[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=input:nth-child(2)", "css:finder"],
|
||
["xpath=//input[@value='Chercher →']", "xpath:attributes"],
|
||
["xpath=//input[2]", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a25b543a-6cdc-4748-9fa9-7bd244dbbc2b",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tr[@class=\"clickable\"]",
|
||
"targets": [],
|
||
"value": "nb"
|
||
}, {
|
||
"id": "ad404cbf-f68a-40f1-a562-5de1c1b165d1",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "72a50180-66ad-4ab5-9d9b-c66d14c85d2b",
|
||
"comment": "sélectionner le parent",
|
||
"command": "click",
|
||
"target": "xpath=//tr[@class=\"clickable\"]/th[normalize-space(text())=\"${nomParent}\"]",
|
||
"targets": [
|
||
["css=.clickable:nth-child(2) > th", "css:finder"],
|
||
["xpath=//tr[2]/th", "xpath:position"],
|
||
["xpath=//th[contains(.,'Lambert Paul')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3fb11d84-b3c9-4fcd-8684-98cf69fd117c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f5b25c33-c802-4ab3-ad52-afffda80888f",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ea71a549-a533-40f2-a8b5-9bab5d69f4ed",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "a1483c0c-400a-4d30-a073-1e936650492e",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "dfc43c01-3653-4039-923d-efe621963979",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "0fa0047c-7b8c-4a26-9145-577d927dec4e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 2",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "add11203-0b9e-40de-ba8d-157afd9fa1ea",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0074acbe-37ee-4e6e-a356-861b73ef14ec",
|
||
"comment": "Trier les noms par responsable décroissant",
|
||
"command": "executeScript",
|
||
"target": "function trierResp(tresp, tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.resp = tresp[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.resp == '' && b.resp == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.resp == '') { return 1; } if (b.resp == '') { return -1; } let comp = a.resp.localeCompare(b.resp); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab; } return trierResp(${lesresponsables}, ${lesnoms}, ${lesnumeros}, false)",
|
||
"targets": [],
|
||
"value": "membres_resp_dec"
|
||
}, {
|
||
"id": "ac586b0a-21e9-4465-9824-f01a40a51344",
|
||
"comment": "Afficher le résultat du tri",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eb6c560e-ce60-48d8-8f1f-a42c56b35ef8",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc25dc9a-c665-4282-89fb-372bcf9f3ff2",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bd3e69d1-397d-4df4-9fb4-72156bba23c2",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "08af8389-7cbb-4093-824a-cd7cbed14bbd",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "4adf5734-dd36-45da-b4f9-fcbdf40f05f0",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "c9fa3d8f-9f92-469a-bf02-1cec244d203c",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_total_membres}"
|
||
}, {
|
||
"id": "b078447c-ed3e-4d65-83ff-57ab2eef4cb7",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c7e36893-4a8f-4f38-902a-f8f2886f9236",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "6aa814c5-af89-4915-9665-503e5ad2f113",
|
||
"comment": "Trier par responsable décroissant",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "01591c12-17ad-4508-8cc9-6ff99597c047",
|
||
"comment": "inverser le tri s'il est en ordre croissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1a11a0a3-5a91-46fc-99fb-f3deb2564176",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c8f41cc6-7008-4830-a560-c89c2e842e18",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_responsables} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9570a400-a8df-42c8-beda-4016dd249ac8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span",
|
||
"targets": [],
|
||
"value": "membre1"
|
||
}, {
|
||
"id": "39bcbeea-dd55-4e8a-8eda-b03a65c46c03",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "387a4fff-8d60-46f9-8da5-69b99928f1be",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "e8459a41-d636-4c2f-a82c-0b2160ba5e26",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "06c48f80-369d-43d9-b16e-8e92aa672c66",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre1}.localeCompare(${membre2}) < 0 || (${membre1}.localeCompare(${membre2}) == 0 && Number(${numero1}) < Number(${numero2}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0de34b7d-5661-4d20-8a8a-d0e2f855824e",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "41593c3e-a2dd-4570-9b38-f216126d5514",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0110e241-1e1e-413e-b19f-c5cf7a1c1679",
|
||
"comment": "",
|
||
"command": "elseIf",
|
||
"target": "${nb_responsables} < 2 && ${nb_total_membres} > 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4fabd8c1-3d45-4631-b2e4-4442e6cb7818",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//th//span",
|
||
"targets": [],
|
||
"value": "membre2"
|
||
}, {
|
||
"id": "8142d289-8479-4b3d-ba84-31de7a9be8b9",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]//th//span",
|
||
"targets": [],
|
||
"value": "membre3"
|
||
}, {
|
||
"id": "3db786c9-5a4e-4dbd-8326-ed1192e1192d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "7e8c6878-a63d-4f63-b35c-2ad7c6f64e0e",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[3]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numero3"
|
||
}, {
|
||
"id": "195b10ff-8d67-4db8-b474-76657e0e88a0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${membre2}.localeCompare(${membre3}) < 0 || (${membre2}.localeCompare(${membre3}) == 0 && Number(${numero2}) < Number(${numero3}))",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ed183b5a-ed9b-4796-9266-8e83e2c115cb",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"is_parent\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2dcacbd7-5799-40bd-8229-204bafe3b829",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e66c7cdb-dce7-47e9-8ab3-c2cc04b972a6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8a3a833b-f9f9-471c-b2cf-bbad1ffb1a33",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0410320e-b9fb-452a-81a5-a6250f09ea5e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "166116f0-2c3a-49eb-b024-68028823b21b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "f593366d-7069-4c0f-8aeb-2162af14ba9b",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "680057b1-06d2-4359-9fb0-4678c402af2b",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ed2e9bfc-30e6-4242-8c30-54022b9551d5",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b1b2e3e5-4528-4b49-87ca-c04a59f465ca",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "8a61633f-b853-4e94-8909-ecdfd59f9741",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "45391cf7-38b8-4f76-ae70-b5aedf2902b3",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "138bb8d9-166c-40a3-8730-1f0265ecd70f",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b399c736-e4be-40ed-96b0-d4d4833c523e",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "0fcae787-adc3-4b05-b845-789dcee4330c",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "85b02934-4d7c-437d-a213-a370f9f230aa",
|
||
"comment": "responsable affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[5]",
|
||
"targets": [],
|
||
"value": "respAffiche"
|
||
}, {
|
||
"id": "60a159b9-589e-4496-bce6-682a91de513d",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_dec}[${i}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "3b0256c8-6389-4a19-9880-c30e272b31c3",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_dec}[${i}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "21a37f0e-766b-4b23-a339-b91e9467833a",
|
||
"comment": "responsable mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_resp_dec}[${i}].resp",
|
||
"targets": [],
|
||
"value": "responsable"
|
||
}, {
|
||
"id": "15516578-035f-4815-960f-9040c1de3c4c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "c9d195ee-26ce-41fb-9c11-25e3adf1b70b",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "49690eb2-be67-49d9-a880-b4f3fa34a41a",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "f66a6a08-1590-4625-aa67-20154d08e9ea",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "respAffiche",
|
||
"targets": [],
|
||
"value": "${responsable}"
|
||
}, {
|
||
"id": "6837df25-9240-4682-92a4-9e375aa2416e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "3eb11db2-4812-4c3f-a3a7-8478f240f192",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "736c1636-6661-49c3-a45f-5f62a359e62e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "25e25640-41c1-4a8c-a8f3-288fed7fb46e",
|
||
"name": "4-90 lister membres plusieurs pages",
|
||
"commands": [{
|
||
"id": "5f9c60ae-6864-4bc4-b51d-dc19cd9e7866",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b8a5a88a-c6d5-459c-9fef-ea83dd92c0c1",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "690a17dc-9419-41c7-a111-6df27be8f641",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "30bfade9-b8a8-440a-afa0-b23f48cdaa3b",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "044ab6fe-0b3f-4b23-8e1a-4c856acec3ce",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "17295ad3-f1ae-4065-8f82-49bda8bd052a",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "edc3fcfe-859d-4694-8ec8-26ea83165645",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "68cefb5c-341a-4a31-a8b0-85b9caa64bf6",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b4896366-a9ff-481d-9dcc-5b0e7f57d9e8",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b4c47201-65d8-4e6e-a41c-812818b897f2",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "bd418adf-947a-4cc9-9d90-7db4c87778c8",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "7177e705-6fb4-4897-aa2c-97cd0d2e3c5f",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0c1d2e63-90bd-475c-b726-0fe1c9cbadcd",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "865ff171-767f-41bf-9867-8bda00465648",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7f454abf-e347-4846-a516-22457335ef88",
|
||
"comment": "Nombre de membres",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "3ed185b3-11b2-49e9-954a-98a68bdf5214",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "36b16814-da4c-4ebd-ae34-fba5c978aaab",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e9d993a2-0177-4a8e-8d39-a2a37acd209e",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "16ec5b60-7d89-48f4-acb3-fdfbb915eb1b",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8a82c16a-2df5-44e1-8fce-abc0164a1568",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "a7d28a28-f2d3-4ee4-b61d-3efd2c186a40",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "d692a876-28f1-4b22-8260-4b0d5aeac1c5",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "4a4f944c-af73-4baf-a964-158279f6e9d4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "24fd1eca-7866-4134-b190-4929523bcfe1",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e9b413a9-515a-488a-a87e-618c9748eda9",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a199a6bd-5a45-41c3-9125-89b8635806c8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "86212fb9-2054-47bb-983e-8647afdbf26d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e8bbd22e-a1af-4518-9c61-9e41fd6ae5ab",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "97213ee1-efc9-4974-8e62-48bf842f0427",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "4714e8cc-23cc-478b-af99-f823544dd236",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "4343fd37-6bbc-488e-8dda-eff13a6057b9",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d26b8be3-b041-4d2a-a30c-d3e6e36ad75f",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7287cf8b-b5bd-46c8-a56c-20029d94d9ad",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "614a98c2-639c-41d1-a62d-04877bc3ec65",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "7d9219fa-7a57-4ec4-94e2-9a856a41f398",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "9dc0d635-24ec-41a6-86ec-58b9b727a3f5",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "40b68cca-77f4-4ee5-8cbb-de37268667dc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc40dc15-00c9-4706-bca5-1deeec1dbe5a",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "ea890997-4608-436e-b0b0-f879f1d4017c",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "529d1349-1152-4522-bfc5-2d20e969dfab",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "335d25c9-2c94-4e8a-b1df-b81f4befb4fb",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "15c1b8e1-319f-4c17-b49a-ec3297de940f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "d82498f4-70d7-4142-b97c-f6d14d7ca14c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6700a179-f23e-4ce7-bcbb-da896ed6a5a7",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5ab90d68-84a5-4c23-924f-86e9b8ea6d4a",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 120",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "114dbda5-9986-48a1-b8fc-6cd93cbfa2e1",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 100 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "9c71e5b5-1bd5-44a3-b402-42e278926389",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "508ba7a8-bff0-4f73-bb20-8bbac0c9f8ee",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "87b6e8ea-58ca-490f-b1f4-44c3a312d1af",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "3b4a56ae-7165-4b82-827e-93623ef83a7c",
|
||
"comment": "Parcourir liste noms pour ajout dans la base",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "028a8c9d-02b8-444c-b3d0-7b0caa0d9500",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "3b6965db-f603-4d4d-9d49-619142bf0360",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "13af1ffd-ac19-4087-bed1-0c56a790171a",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "f6f7f579-35db-4dc8-bebc-67be762902a9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ffe51133-32f8-4b35-93f5-70e5a981cca8",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "9eda34ba-83b4-486f-9670-8ea1d3787d1c",
|
||
"comment": "Générer ville",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "d3c14c43-efce-4c6d-b561-70089f26b99c",
|
||
"comment": "Saisir ville",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_vile", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "e6684670-73d9-46b3-9a48-340b239e681f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "4edf66cc-a1ce-4074-a7d1-6b4ff7f9d166",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "5258cac1-c8da-4cff-8c06-13d7e3bcb626",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e04e6e07-2918-4035-b8a6-a0d0de2bf236",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "825221da-e063-4271-a2dc-96d1603de589",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e1de0677-7d2b-40cc-9389-f884574fe373",
|
||
"comment": "Vérifier les membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d9ede09d-9a87-421a-be52-c3d51cf2d9c8",
|
||
"comment": "Menu membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6739f069-d0ae-4347-9d14-b6b5ba1f75af",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b6315ef7-8655-4285-993e-6d858e00255c",
|
||
"comment": "nombre de membres dans ces catégories",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "574f25d9-b11b-4b42-9ed5-30f5425ec66e",
|
||
"comment": "idem",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "f91f6c36-ad5f-4237-a45c-b4199802d706",
|
||
"comment": "Vérifier nombre de membres",
|
||
"command": "assert",
|
||
"target": "nb_noms",
|
||
"targets": [],
|
||
"value": "${nb_membres_cat}"
|
||
}, {
|
||
"id": "6295f9cf-164e-4c90-b329-37d8152d66e8",
|
||
"comment": "Filtrer : toutes catégories même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cb02a6f2-90b8-42df-aedb-a33901822c37",
|
||
"comment": "Trier par numéro",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9d780d99-318f-4d86-a34d-6643c95d1054",
|
||
"comment": "inverser le tri s'il est en ordre décroissant",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e2fe96bd-875a-419b-9cdd-65ee346cd8be",
|
||
"comment": "au moins 2 membres",
|
||
"command": "if",
|
||
"target": "${nb_membres_cat} >= 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5bb4df35-2cdd-481d-8b30-682723a6ae0c",
|
||
"comment": "premier numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff1"
|
||
}, {
|
||
"id": "02e2d975-ea03-4ade-8d2b-244c46bc71ac",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff1})",
|
||
"targets": [],
|
||
"value": "numero1"
|
||
}, {
|
||
"id": "eb229a97-6b19-4015-981d-5929a60b982d",
|
||
"comment": "deuxième numéro",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numaff2"
|
||
}, {
|
||
"id": "5e6cd241-3f16-434b-8215-0710c5fe96f1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numaff2})",
|
||
"targets": [],
|
||
"value": "numero2"
|
||
}, {
|
||
"id": "ceed1d9f-ca7d-4fb3-bc95-56c51f92866a",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero1} > ${numero2}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "844396e5-bdbe-49fd-a918-61865e79cd03",
|
||
"comment": "Inverser le sens de tri",
|
||
"command": "click",
|
||
"target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"number\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "17d90fe8-6460-4e77-a98a-33793c794bb1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "43e73ac7-bece-487d-b827-6d631c7d80f9",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "605fe194-1320-4466-9dc0-451d830f7eb7",
|
||
"comment": "Nombre de membres sur la page",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "85aabfcd-08f9-4b66-b52d-38d522fdfea7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b83b19ba-c1df-463e-b475-86fb579896fe",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "799af842-53fb-4499-b4ce-c11e07336dbf",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_cat}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3cbc31e4-1896-4bc5-a805-3e134b264d4a",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c8647fb6-4f7e-4d09-bfec-4ead1c35bd49",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "81ba53ec-a01b-4dff-8258-1e45a3bd4ace",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres_cat} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres_cat"
|
||
}, {
|
||
"id": "e67245e8-18bf-4216-b4d1-9a8577250e88",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "cef5916c-3baa-44ef-b179-09bc12cec949",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "f40340cb-c7f2-4d62-b3fb-e71d024f12dc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "27f4c57e-ee66-49c3-8553-189bff01144f",
|
||
"comment": "numéro affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "b75c820c-8cd8-4908-9da4-860004173bb9",
|
||
"comment": "nom affiché",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "fa1e8789-53f1-4896-9baf-c36a78739b19",
|
||
"comment": "numéro mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.at(${i})",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "af746f85-7a5e-4c53-aaa6-c6868f4b8bac",
|
||
"comment": "nom mémorisé",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "ab8a0b81-b0ba-4a98-b2a6-21d1e0f0e1d6",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "n=${num} ${numeroAffiche} ${nomAffiche}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a9272408-2d37-48d1-8595-35aeeb43462a",
|
||
"comment": "",
|
||
"command": "//echo",
|
||
"target": "i=${i} ${numero} ${nom}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cfab7f82-617f-47ba-ad58-9d7faf8a6864",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numaff"
|
||
}, {
|
||
"id": "dac4b1ec-1e0a-4d78-9a8b-24f0b16033bd",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "30271924-fa9f-4cc4-ada8-71097044dc98",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "6a9b4aa6-b054-4215-8178-a82c8e3f3618",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "d202cce0-29c4-48ae-9b7b-08d8c99e8da3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "5d00e23a-57ef-46a0-becb-4091ffa47ed7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "e222e9ff-b40c-4b8b-a9b8-1adfc1e68184",
|
||
"name": "5-01 chercher membre unique",
|
||
"commands": [{
|
||
"id": "1c022081-41a7-4846-8a4e-ece269c35b7a",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b76a681e-bb38-4d83-a408-415bacbcff9a",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f8808100-2093-453a-b012-09c56cdb973b",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "f96548e8-db2a-4d80-8bb7-ce00bdd795ca",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a938a3cb-c92e-41de-8ae6-465ac28eb3d4",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "6ed9570d-a46b-4e68-ae8c-bd21014d76ec",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "641fa2c1-c419-4899-a89b-89d28cff0e53",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c276cae0-4975-49bb-aa93-e7d130df3c05",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d1f7a14f-0347-401a-8fba-eaff330af744",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d30d317a-dc7e-47d6-a16c-58c90c0654b7",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6ebd16d3-7c4e-4cdb-b496-bb33ea6ad778",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "550d1859-69d3-4e10-84a2-738d2b13dd00",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "710c2418-6112-4865-bedc-57aa8a561cca",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e6257e1f-0f32-4c07-ab4c-313b7d98defc",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "98898ac1-c363-4dcc-b836-9b00307ece00",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "f4f832e5-40ce-4bed-95d9-a488ec75cb92",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4e7fdabe-c637-4d53-991d-29545a5272e2",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "9bdec5c6-ce4a-48e4-85b9-d5548d06def7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f18c3796-2b1d-4d2b-b181-b7d873b738f8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "b183b26c-f98c-4ca2-ade7-e5f025a6f367",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3e106915-6576-4964-97b8-10355037c08a",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8fd47084-db01-41ce-ac50-0e588b83a397",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "43d928a4-9766-4c53-972b-302728c39bd4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "28fd2cae-2d9a-4cfa-9cf3-82e7a4f0ef02",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "abce90af-cadd-473e-b9a9-b336457eaa3a",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "90422117-fd21-4eb6-b549-ad82338f1365",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "974282f4-acf2-489c-aea7-62c94c7910ac",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "9b6e6a7b-28bb-4300-b909-8f2b7c590542",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "21abdaca-a8c7-40ae-83f7-4d9a34078951",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "1657ab55-4e2a-45e6-8028-597e9e573bb2",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "214784a5-aba4-4d08-8062-7ff7d4db903d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "55e9d64b-f4eb-46a4-b992-221d50119dd8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8341959b-dca2-46fd-8ef6-f4efa0be92a0",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5fd45bce-47d6-47c8-967b-7d05c0422875",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cf70a3d5-5e92-4aa0-b676-18b779fc828d",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "90a097f6-9715-4847-8a4f-751ac7e614f9",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "81ae2107-1da7-4b6b-8bdf-52ef9d657c07",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "4b63d378-b81f-427b-beea-45c4638d8fe7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "c879a2a6-a055-4dcb-888f-b41a4454cc23",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "17ff0598-2851-45a8-a06a-9cc450a0a408",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "d35db3a7-42fb-4290-9139-adbf20131218",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "68813087-2486-4aa6-841e-c62ec1dcf080",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "d06e62be-a82f-4068-bd36-d405fffe9dfe",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "fd7edb53-efef-4e39-8246-991546c58ec6",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "27200ccb-5b0a-4aeb-ab0b-343636fdd108",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "3df49bff-0795-4c25-9245-e256150e0f8b",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "85a2128a-8d93-494b-9d4e-9c295334b7e5",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a1e5aebd-6996-4fab-83cc-3f8cf91d10c1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "f9cfea7a-761a-4226-9542-937d7374656d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "21ce798e-cb2b-49b3-9587-305fc9883941",
|
||
"comment": "Choisir un nom sans homonyme",
|
||
"command": "executeScript",
|
||
"target": "const accent = 'àâäéèêëîïôöùûü'; const normal = 'aaaeeeeiioouuu'; function normaliser (chaine) { let resu = ''; chaine = chaine.toLocaleLowerCase(); for (let i = 0; i < chaine.length; ++i) { let ind = accent.indexOf(chaine[i]); if (ind == -1) { resu += chaine[i]; } else { resu += normal[ind]; }} return resu; } function nbocc(elem, tab) { let nb = 0; for (const e of tab) { if (normaliser(e).localeCompare(elem) == 0) { nb += 1; }} return nb; } function getNom(tab) { while (true) { let pos = Math.floor(Math.random() * tab.length); let nom = tab.at(pos); let nb = nbocc(normaliser(nom), tab); if (nb == 1) { return pos; }}} return getNom(${lesnoms})",
|
||
"targets": [],
|
||
"value": "pos_cherche"
|
||
}, {
|
||
"id": "f41a44a3-89cf-4aae-9ba6-f3aaa6a8d0a0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${pos_cherche})",
|
||
"targets": [],
|
||
"value": "nom_cherche"
|
||
}, {
|
||
"id": "46850638-5f11-4be0-944d-8b08884a3d48",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.at(${pos_cherche})",
|
||
"targets": [],
|
||
"value": "numero_cherche"
|
||
}, {
|
||
"id": "41fe6725-7be4-4b97-bd83-5e8b5980214b",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "04339615-491a-48f5-9888-cb1f6956d66c",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nom_cherche}"
|
||
}, {
|
||
"id": "f164e7d8-eed3-42d9-bb38-2fb7e5447528",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f992fa8d-d20a-4cf2-8a16-4cb414a37cd8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "0beb5586-3e78-4491-a885-60be13ce6330",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${titre_page}.startsWith(${nom_cherche})",
|
||
"targets": [],
|
||
"value": "ok"
|
||
}, {
|
||
"id": "e2776ae7-9284-4cef-a318-447fb3328759",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "ok",
|
||
"targets": [],
|
||
"value": "true"
|
||
}, {
|
||
"id": "da0f9574-1f5b-4b99-87d3-2ffc73bbaf2b",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(., \"Numéro de membre\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "numero_trouve"
|
||
}, {
|
||
"id": "2f81fc81-26dc-4ded-9b30-4b829d0f68a7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(., \"Nom & prénom\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "nom_trouve"
|
||
}, {
|
||
"id": "4da11a59-5b1b-4877-b476-6f861fd8f536",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numero_trouve",
|
||
"targets": [],
|
||
"value": "${numero_cherche}"
|
||
}, {
|
||
"id": "57b3b072-0825-4bd6-a54a-04b7d2c7d245",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nom_trouve",
|
||
"targets": [],
|
||
"value": "${nom_cherche}"
|
||
}]
|
||
}, {
|
||
"id": "e0b8520c-d128-4cd9-b6fa-b351ea91d4d2",
|
||
"name": "5-02 chercher membre plusieurs résultats",
|
||
"commands": [{
|
||
"id": "f0cf2e2e-90d0-457d-89ef-bb9699f169ed",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1e91b39e-b68a-4ece-8482-fbd35115a6b0",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c41e68b9-10f8-4904-be3a-ba974a5b130d",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "505d334b-525d-45da-8451-8258ba70c1c2",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8bd3701e-af23-4cb9-a371-25e41a818282",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "ad507785-778c-49dc-983d-41338f3239fc",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "51014808-3f81-411c-a7fe-3d3179ed64ca",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0fa5f107-05fe-4937-b360-7d5b567fa77b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "70567fd6-f7fc-481c-b8c2-3e0e0223ecd7",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c2d55c39-90b9-4a9a-bbff-b9fc3f7b9f0c",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "76f7138b-df11-4f37-94a2-195485223a5f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "121fb2ee-39d0-4fa5-8097-253bc6336813",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "5b9fe6a1-dbc9-476f-b928-bc30be75035d",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "32ca0a92-3f06-4fcc-b949-4299b906e61a",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "9e6ffe90-f12a-446f-b662-8295dcdf4c74",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "1b8f626e-4496-4ad2-befe-dba81929dd7b",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6c197fe1-c42d-44ae-9cd4-df6725c3d73f",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "4fa888a0-006e-4873-8720-e372a83c41c8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b0c15228-1fea-442c-b529-d60a5b5a13a8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "2601fe65-984a-4918-80e8-2887c37abff3",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "74d587fb-5927-4a60-9916-8037f0b41253",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8861b4bf-5cac-414f-9c1b-67f5542595bb",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "73ca25e6-d197-4003-87fc-cca8b56fdc0a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "4c865116-2416-412d-bc64-cb14f7cfa3ae",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f6b8d10c-9f5d-47b0-9a30-9384f9c27c70",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "7ee64083-8eb2-4733-baa0-2085a0a5bfcd",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "23a4e6f9-fd13-4df6-aa25-effdc8e8a542",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "40a3f66d-1622-42bb-909d-f907f296d7da",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "bc3c917a-bc8b-4595-bf8e-e6626d9253a7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "f83ba0f4-f9ca-4740-bc80-3e89c0ccbd4e",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "5f951804-bd6d-40a6-9139-6a3cb371afb1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "ba7b4446-cd3d-4aa0-a2ec-8d89d68cc760",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "acf64ee8-1b57-4254-96ab-d054ef541e6b",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dadf51e9-a83d-4b21-9ba3-d58d6f977cb6",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e3edb40d-df08-4ee3-9002-dc160d58799d",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "9d59e879-84ac-4b83-8ca3-08442c410283",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "af4a3b20-ce39-4425-95a9-9b7b6031441e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "8e703e9d-a9d6-4e61-9a47-4ee7239de68a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "b86d6a74-a9ef-47ae-8ae4-2a8a36421216",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "194ca944-1a94-4c4c-b18a-5264454131dd",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "fe3a2e57-7ee2-40e7-9170-f545ccdf1b42",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "345a15c2-f53e-4352-874a-ffbfccf8b111",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "915bfd92-3b74-4c86-9762-64aaed0c8c9f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "b6c3d0e3-4bd0-4c99-b278-8e2f767aa8bc",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "c0331f95-62cd-494e-b630-2f7f57ac9278",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "bf1d3984-383c-4d3d-8f77-d2ae52b797e1",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "75231333-ec6e-4091-b658-2b72d6d7420c",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "699f61f4-23c0-467a-9104-28d9b41946b8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "a2cd4569-ec49-43b6-a662-e3ae126e4554",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ecd7cec7-aed5-426a-8246-a133f8366beb",
|
||
"comment": "Ajouter un homonyme",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3c4f91db-e94f-42a8-9c86-9ff24410c126",
|
||
"comment": "Nom du membre à chercher",
|
||
"command": "store",
|
||
"target": "amber",
|
||
"targets": [],
|
||
"value": "nom_cherche"
|
||
}, {
|
||
"id": "d865d12a-ad0e-4a1d-b998-191df78fe0c5",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1); }; function homonyme(chaine, lg) { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < lg; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, lg/2)); let fin = upper(str.slice(lg/2)); return debut + chaine + fin; } return homonyme(${nom_cherche}, 10);",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "c02d645c-d453-4d4d-99e5-12e2f9bd65b0",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "02357ee2-cd43-49f0-b915-e0ecf8fc6634",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "80e8744a-ffd7-491f-9949-fa1505067718",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "d9aeaaaf-7a63-46ba-b203-11a9a15a6b97",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nom})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "24e8c864-7e47-4a7a-adae-0c959a5b2b10",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "d691ea41-ec13-407a-9f28-57ca9eb555b6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "4182c0bc-1d59-4f3a-b45f-fd1cf6d1d5ff",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "91b6be2d-7963-49a8-aadb-f7505b62236f",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ba372402-e661-43ec-a760-83eba9361372",
|
||
"comment": "Trier les membres par nom croissant",
|
||
"command": "executeScript",
|
||
"target": "function trierNoms(tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros});",
|
||
"targets": [],
|
||
"value": "membres_alpha"
|
||
}, {
|
||
"id": "c23cd8df-5720-47f0-b2f4-83c745abf9c8",
|
||
"comment": "Faire la liste des homonymes",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2dc16d09-f423-475c-931e-c29e268da8e9",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const accent = \"àâäéèêëîïôöùûü\"; const normal = \"aaaeeeeiioouuu\"; function normaliser (chaine) { let resu = \"\"; chaine = chaine.toLocaleLowerCase(); for (let i = 0; i < chaine.length; ++i) { let ind = accent.indexOf(chaine[i]); if (ind == -1) { resu += chaine[i]; } else { resu += normal[ind]; }} return resu; } function indonymes(chaine, tab) { let homos = []; for (let i = 0 ; i < tab.length; ++i) { if (normaliser(tab[i].nom).includes(chaine)) { homos.push(i); }} return homos; }; return indonymes(${nom_cherche}, ${membres_alpha});",
|
||
"targets": [],
|
||
"value": "tab_pos"
|
||
}, {
|
||
"id": "61fee7a5-cd7c-4fcb-9986-1da9d84e1289",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${tab_pos}.length",
|
||
"targets": [],
|
||
"value": "nb_homonymes"
|
||
}, {
|
||
"id": "ec54ff83-2297-44cf-9a06-9380f2d3f1e5",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "60168e5e-40a7-444d-91f8-660d2867f2ce",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nom_cherche}"
|
||
}, {
|
||
"id": "6b7bcfa0-15df-462e-a908-804b3d1413e1",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1461e661-9886-4c48-9893-53ea9710238f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "593614fe-9f7a-4ea0-ab78-6b8804c68ddd",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "b8c4503b-5ce5-40d2-be8b-afd53884e4c2",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tbody/tr",
|
||
"targets": [],
|
||
"value": "nb_res"
|
||
}, {
|
||
"id": "082c3974-dbd5-4113-8fdc-632d17a464fa",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_res",
|
||
"targets": [],
|
||
"value": "${nb_homonymes}"
|
||
}, {
|
||
"id": "29c9b49f-f28c-460e-892b-d81e50ecf869",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "a4629830-c51f-4473-9905-686392a9b90f",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} <= ${nb_res}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "67caf8c6-bb48-40ed-b515-a86d036515cb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${tab_pos}.at(${i}-1)",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "aaff611c-5053-452d-87f3-e1e0349f98e0",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//tbody/tr[${i}]/td[2]/a",
|
||
"targets": [],
|
||
"value": "nom_trouve"
|
||
}, {
|
||
"id": "43075562-08ea-40c4-87f9-ddbe328383b5",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//tbody/tr[${i}]/td[3]",
|
||
"targets": [],
|
||
"value": "numero_trouve"
|
||
}, {
|
||
"id": "2bac713b-e68b-449d-9c83-e74943ad714d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${num}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "373eaf44-e53e-40c2-9431-f9027dc2cc04",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${num}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "f20ccecc-3d14-490b-89c5-7f12ba5d7baf",
|
||
"comment": "vérifier si le nom trouvé correspond à la recherche",
|
||
"command": "executeScript",
|
||
"target": "const accent = \"àâäéèêëîïôöùûü\"; const normal = \"aaaeeeeiioouuu\"; function normaliser (chaine) { let resu = \"\"; chaine = chaine.toLocaleLowerCase(); for (let i = 0; i < chaine.length; ++i) { let ind = accent.indexOf(chaine[i]); if (ind == -1) { resu += chaine[i]; } else { resu += normal[ind]; }} return resu; } function verif(chaine, nom) { return normaliser(nom).includes(chaine); } return verif(${nom_cherche}, ${nom_trouve})",
|
||
"targets": [],
|
||
"value": "ok"
|
||
}, {
|
||
"id": "afaf8b92-8d6f-4023-b71b-923fd4e424ae",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "ok",
|
||
"targets": [],
|
||
"value": "true"
|
||
}, {
|
||
"id": "c30438d9-2326-4d04-8410-5de9ba29da76",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nom_trouve",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "56d05609-bbe4-4fda-b42e-a63eb795ad4f",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numero_trouve",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "a31e9670-1e13-4e76-9084-ce2ec119e59d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "47f58a5c-b726-40d9-a6df-61e11b93335b",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "cb3e76df-5def-477c-bad3-fbf27d8240f3",
|
||
"name": "5-03 chercher membre absent",
|
||
"commands": [{
|
||
"id": "55fcb139-ec03-4ff2-ac8a-4fb73f55cc7e",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "41d12e9b-fd2b-41d7-915e-d45b42d6b922",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "abd91ef9-ff3e-4524-8fff-983501ee6608",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "b4c4a65d-eeef-459c-8144-225933a7dcfa",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0876382f-9fbf-455f-b5ac-0e6c0a004969",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "63329a04-29bb-4041-8106-001451e24d6e",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "c3560fa6-a5b9-48ae-b921-c26d08ca8836",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3a73d7ea-044e-4a60-b875-519495826aa3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fbfbf12e-796f-40dd-a047-e8df1ae253a7",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8be34c7b-a75f-4ac7-9960-21bfd1979523",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a250f5cb-6c10-4a75-9b66-7fc7b9728fa6",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "e921d966-4c9e-4bfb-bbb3-d2228f4996ea",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "b81eff75-6f68-4930-b796-505ee5734911",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc4a0219-4f93-4912-ac03-ec15fb42cf10",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "66eb4192-44a3-4c83-b8f0-1d95563f74fd",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "cd6e7f0b-5602-4c1b-a03f-e9a89031e641",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d7f23320-2e5e-49d1-8656-3f80e8f72dd1",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "4ecc3a43-6df5-4ced-8759-5ddb68f09e09",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c9c51215-9311-4308-a7bb-fde014ee482e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "edcf9644-1c35-49ff-95ac-7988035a8e26",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d4d5ab5e-710d-4e66-a451-7c484e91ce4a",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e3d1850c-1d13-4765-9f26-34d468d12433",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0bc5f243-824b-4c99-b2e6-c26bd0bf05be",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "6de693d9-f3f3-47ed-80fa-8cc2fafcaa86",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "4000ad86-3ec7-4ae5-b1bc-06935c4f13fa",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "0da510f4-2a99-4aa8-9b82-770d6456021d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7df0430d-6f86-44ec-a783-c9b717615b25",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "f5744572-213d-4909-9b73-c47f120eb13b",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "03a1627b-b4ff-45e8-8185-5825833cef78",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "400dc937-3b88-47e4-8883-edd68c452264",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "50ef92bb-101c-4fd8-8bbd-adfbd1ac1f5b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "53ccb818-4941-4124-a693-a8e845961c8c",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4e6d04f0-bd3e-4596-b3a9-f4430fec90ba",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3afc8f5c-923e-4226-973f-dbf1a2efab7b",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2eaa4fb0-6750-4c59-b25c-65dd5e7a6b64",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "d0fee411-2e7b-4612-9f18-af25471dfc9e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "410f2a0e-f891-4b22-8e50-1aa14ddd5b40",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "e39378a3-4881-4b8c-a186-89d9938db2ab",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "b776d1f2-5e74-4508-b104-79b9124301c5",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "61d029f4-7e11-44eb-9613-1dc76809b3fa",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "6e9da433-248d-4090-83c9-3a4e9108975f",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "abbec7f8-9688-44b7-9170-7b28ef245fda",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "68cac8c6-c44b-45eb-a721-c11585358e2f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "7e4c3112-e20a-49f9-978f-fe2b9c3b3380",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "fedd0cc8-f199-4e97-9712-8cbfacfef384",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "fdf22ad3-4572-45ca-8a14-520a7a3a7de2",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "d45d86c5-9ecf-4e70-bf75-c38c323729e7",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "d2fab015-738a-41e2-b100-51b1344f949e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "ddf26bb1-3f70-409f-affd-cd815a192cdc",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "eeaacd66-07ef-43ca-8cb8-25c507f4238f",
|
||
"comment": "Générer un nom absent de la liste ",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1); }; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; const accent = \"àâäéèêëîïôöùûü\"; const normal = \"aaaeeeeiioouuu\"; function normaliser (chaine) { let resu = \"\"; chaine = chaine.toLocaleLowerCase(); for (let i = 0; i < chaine.length; ++i) { let ind = accent.indexOf(chaine[i]); if (ind == -1) { resu += chaine[i]; } else { resu += normal[ind]; }} return resu; } function nbocc(elem, tab) { let nb = 0; for (const e of tab) { if (normaliser(e).localeCompare(elem) == 0) { nb += 1; } } return nb; } function genererNom(tab) { while (true) { let nom = chaine(12); let nb = nbocc(normaliser(nom), tab); if (nb == 0) { return nom; }}}; return genererNom(${lesnoms})",
|
||
"targets": [],
|
||
"value": "nom_cherche"
|
||
}, {
|
||
"id": "cc01ebba-16fa-4d89-b980-d52cc4a516ae",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "00d9d82f-84fc-4e99-adda-b25ac1803912",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${nom_cherche}"
|
||
}, {
|
||
"id": "32b1728f-278b-447c-ae0c-de26324be140",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "57edae49-007a-437d-9fe9-b1952bc6b1d8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "1c64c382-1288-42e6-90f7-1c9cdb8f93f9",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "ca20be4f-7a8b-4594-8976-e6bdac2de26a",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tbody/tr",
|
||
"targets": [],
|
||
"value": "nb_res"
|
||
}, {
|
||
"id": "a2d62bd1-4a99-49dc-b5a5-dc32df918772",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_res",
|
||
"targets": [],
|
||
"value": "0"
|
||
}]
|
||
}, {
|
||
"id": "7c55c402-5f6b-4b67-bbfe-b4d167ea2dda",
|
||
"name": "5-11 chercher numéro membre présent",
|
||
"commands": [{
|
||
"id": "d722c0fc-6785-4aa6-8f56-d302788cc759",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a0afa303-2b20-4353-a6e4-4c625d8a3501",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e9957f8e-3e80-416d-8525-b80568b24d09",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "1bd79bfb-072c-490d-9e30-90457ca72f83",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7c67bbe3-adb3-401c-9ade-332404d9a9d9",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "3edd8384-f584-45f2-a98c-081f395e6f2d",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "08f5a8f9-0f4f-4715-83e6-70e8dcc773cc",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ed33c325-c2f6-4986-95c3-f6912e31b313",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8edba250-d10c-46e4-bcb2-d324c33ab134",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "710f2e7e-332d-4770-9171-b25b126e2dfa",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "84ec243f-8e6a-424f-8697-f52e1d8f565c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "3ea29693-8755-45ca-acae-7c5a307d4f52",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "a3d20ecb-6f4c-4759-b620-6f732e47a9cc",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9fb65c48-a5f3-4812-8429-1a8f43511d1d",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "7322c27d-3612-436c-9478-cd83fafceb90",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f0632a5a-1e59-40c9-9fa3-b9472a707d73",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "7a4cc026-d578-42c5-a50c-8cbc9bfad0aa",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f4b864d4-adf6-4369-a35b-38f4930ad991",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "2cd04b8e-6cd9-4141-9d52-2a31d879ceab",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "99461f4e-11f6-40ef-8c92-3f83af86830e",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6527323d-328e-45b3-bdb0-0da0f1f5433a",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "77b4f8b4-3b74-4159-8179-528e1289f8c6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "8e58760e-39f4-4279-b869-1e8c055b8119",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f9a02556-81d8-4377-a01e-a322adf47fe4",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "743075ec-14c3-4ffd-a47d-e227ad918892",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d2d23c5a-ad86-4383-a88b-9336b449610d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "2aff39b4-a5b7-4700-a8b0-52f9d18ea1ab",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "6ae6a522-e747-41ca-acea-520c9e9d84a0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b8c7bde0-4a29-4b57-a8f4-09df9b95cef0",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5d29c0cb-d2e5-4e04-acbc-af1b1b1b34e7",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dd043580-1950-47f2-8415-78a3c39a0fe7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_nouveaux"
|
||
}, {
|
||
"id": "ae42c58b-d945-4c13-9530-c9f70d63a739",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3516fa79-8fda-4829-b4ca-1bb91595e417",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 7 + Math.floor(Math.random() * 15)",
|
||
"targets": [],
|
||
"value": "nb_nouveaux"
|
||
}, {
|
||
"id": "425f9c40-95aa-4c80-a8af-33349366e559",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "86f580d7-97fe-495c-aac7-4f877302a6c4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "ff441e40-3316-4546-8f7f-5ee713ba7140",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_nouveaux}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f1fae258-756d-4900-bdfc-a7951628e3ef",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e78a0784-9c3d-4d43-a156-c614f64c5b95",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "79a7179e-8cc5-4236-a2d9-fd0aca87540f",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "680e0cd0-875c-4a7a-b51b-ee5be68c2365",
|
||
"comment": "nouveau nom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; return chaine(11 + Math.floor(Math.random() * 5)); ",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "76056b89-9da9-451c-bde5-fb13d20724d7",
|
||
"comment": "Saisir le nouveau nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "fc724fd9-661a-4bd3-b516-012aca5d788c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "313626b5-2370-4b83-bc3b-063306f676d2",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "c16603c1-1ab1-413d-ae7c-a0e489953e0d",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "539fdda5-a82c-4841-9a4b-f8241508e398",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "ba52b078-b592-4f0e-a952-a1725d2b3ce1",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dfd63781-fe5c-4058-8b3d-5d3153be9120",
|
||
"comment": "Numéro à chercher",
|
||
"command": "executeScript",
|
||
"target": "function getNumero(tab) { return tab.at(Math.floor(Math.random() * tab.length)); } return getNumero(${lesnumeros})",
|
||
"targets": [],
|
||
"value": "numero_cherche"
|
||
}, {
|
||
"id": "2cee297b-cbc9-41c2-980f-e914a158bd16",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ab173dbb-de68-415f-9a0a-b2a666016069",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${numero_cherche}"
|
||
}, {
|
||
"id": "4bae7915-e25c-4f13-b337-336b57fd6b16",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ddf372a3-2509-4f45-bc88-e308013b0d3c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(., \"Numéro de membre\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "numero_trouve"
|
||
}, {
|
||
"id": "2023b28b-d68a-48ee-a364-612d277c46ae",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numero_trouve",
|
||
"targets": [],
|
||
"value": "${numero_cherche}"
|
||
}]
|
||
}, {
|
||
"id": "222c2c01-b33a-4c51-8f6e-103f9ac3504d",
|
||
"name": "5-12 chercher numéro membre absent",
|
||
"commands": [{
|
||
"id": "3ecc1451-817f-4247-8fc3-353f0c6abe8c",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "04e345d9-a348-4c9f-b6a5-0f22d374f2f0",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "35438995-68c1-4a1b-9c7a-9f21736bef54",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "65d72cae-5f2b-45fd-ae37-c8d61d13de89",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "84496d7b-0b94-41af-8dec-b5e9d853b9b7",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "ff4f5a7f-c5c1-48ca-be52-820eedfee3b0",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "f47a920e-bbea-4e2b-82da-40468b08e3ec",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "37a23154-d44d-4dcb-b694-6300cd94553f",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a2394714-d8a5-4754-adba-97b9d1eedfec",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "49dade6a-3dc4-4ad6-9162-f3bac73dde62",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2425e2c5-a6a9-4fcb-bd04-82c478ef53c5",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "bb5ebc7b-62c3-4e30-9b81-9c1346fc735a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "40f41e94-fbfe-4a40-bb45-dc96a34afa55",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4adc920e-d63b-4ddd-9c48-2f9f73d8d8f1",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "72e93d31-1ccd-4ae7-8673-d05fcc44ddd7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_nouveaux"
|
||
}, {
|
||
"id": "88f1f71a-4478-4b09-be6c-a2f5942e9424",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 20",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "77864cf0-9767-4cd9-89f7-965cc71a02b3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 7 + Math.floor(Math.random() * 15)",
|
||
"targets": [],
|
||
"value": "nb_nouveaux"
|
||
}, {
|
||
"id": "fdca31b5-0cc5-4178-afde-a2bd4b48cfff",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "99a5da94-d666-4da4-a4d9-42d7223d6b2f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "cc94a9ad-0d54-4b6d-aaab-4ad1c62b7454",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_nouveaux}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "534edbdc-d4d4-46d7-83f2-c1445334f491",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e8f23e3b-f635-46e6-a385-f05024a7fa24",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "//executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "65af191a-bccb-46a8-a8fe-41e6d7003302",
|
||
"comment": "nouveau nom",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; return chaine(11 + Math.floor(Math.random() * 5)); ",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "9248aa96-562f-4978-b6a4-f422b5e10692",
|
||
"comment": "Saisir le nouveau nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "ed5cf35a-8764-4b78-bf34-811ab2a4b5e0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "5aa27fac-143d-43d6-a845-9512958d0b9c",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "1a372467-588c-45ee-b488-2209b2063139",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "e0972263-0f92-47a9-803f-822193664567",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "7546881b-1361-4b2d-a188-42e24c7cd0bf",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "29da57dd-ffd8-4cb5-a50a-2bd83943da8e",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "298c37e1-9476-40ce-abab-3c71c9d9fd76",
|
||
"comment": "Numéro à chercher",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero_cherche"
|
||
}, {
|
||
"id": "af848da9-c5c4-446d-9976-d6c350121945",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "028f9dff-b42b-4b58-ae7a-4bde64b13eab",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${numero_cherche}"
|
||
}, {
|
||
"id": "60e220c8-d1c9-4846-b2d7-f2a9e56cb9d2",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "9731707a-e2d4-44ba-b369-bfe4376e008a",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "cbbad468-d6c4-4d8e-8784-2648ee318911",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "b84ffbdb-9519-42e9-bb0b-812e682acbb4",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tbody/tr",
|
||
"targets": [],
|
||
"value": "nb_res"
|
||
}, {
|
||
"id": "26eca62a-52bf-4fdd-9442-c3bb3faecfc3",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_res",
|
||
"targets": [],
|
||
"value": "0"
|
||
}]
|
||
}, {
|
||
"id": "748d040b-eed8-4d60-a769-a2e9f58ddd6b",
|
||
"name": "5-21 chercher courriel unique",
|
||
"commands": [{
|
||
"id": "8836521a-243c-423e-bfef-d8fe9677661f",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "09c50a46-c44f-47c4-88c5-21f5649de3e9",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "162c98f1-83a5-4cc1-a04c-af9cb5861fec",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "a7c573e2-04f6-4798-93d2-0508d638103d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "fe4e01a5-0b38-4bef-8a1f-37c098ee3721",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "f4c2dfbd-c7ae-4143-b543-92e11c5cc712",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "38795aed-e526-40f7-91c6-a178ac02e90e",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b6a62e3e-c67c-407e-83b4-6f2d5bc7b1f8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "35a3e694-84c8-43e4-a789-833ebef85239",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1520cb9f-f1d4-4369-8271-1ccc3f86dc91",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dd420bf3-dea8-4f39-964f-44d68dafb1c1",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7b66f850-460a-4608-9ff0-111ece58f004",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "f2136a56-199b-4e45-9bce-bb221a085219",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3d936cd8-99a4-440b-910a-17e54a9b8320",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "6b16168b-c2ff-44b6-8eee-1788547430e2",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "63e096ba-d0d2-4355-8fb7-fd45e3bd93bd",
|
||
"comment": "Init liste des courriels",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "6766668a-2402-49d1-9a79-1aa04d8a002e",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2c016cd3-b9e8-4be6-8824-e08af0112f9d",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "246b8565-54e7-4c83-9f25-ba4f78fbc4c2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "f3692256-4bef-471a-94cb-28fd74880cdf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "7de4455c-cf94-4a01-a123-6be30f469b0f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "1842ff4f-ef29-4e5f-abf5-00e6603da227",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2ac6064e-949f-4bfa-9f62-3ad3238f7c63",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "438c53f4-c4be-44a0-80be-2d245c6e9d62",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "53d13f2b-2c62-4d43-b9c3-0de68797fe85",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "f3801924-8f11-4001-8b2a-1dc4e9a0b023",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b4249191-a20f-47e2-8c30-18f1462bcbf2",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "16783046-6a94-42b3-a552-ecf57280298e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e18addce-9891-4820-a070-4df75a7f02e5",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "69d8e96a-b707-451f-8bc6-cf396b321109",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "62a4dc20-47fd-4457-84ce-576203bb8239",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "a240b4ad-5a4a-4cdb-bcc9-8c2676709f78",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "0cbb9b75-869e-434f-a38f-d11aafd32262",
|
||
"comment": "afficher fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "87866c80-31b6-4fa8-b646-3974c7e1f22d",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "mailto"
|
||
}, {
|
||
"id": "15b4090f-f48d-4a8f-9e19-ee4704f0ae67",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${mailto} >= 1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7a9f4963-3916-48b0-9a0b-0208708047c7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "0156b1a6-6999-4239-b97e-d690626fcd86",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_courriel} + 1",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "9e426d6e-4f7f-4f8a-93d2-5e43341f76fb",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ed0af847-ca01-4f7a-9827-4dc2dbded6ff",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "d58ea2bb-eca6-45c4-b38e-023077bf3118",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3a8ceafe-4571-4d03-8ebd-97b9307597dc",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "54ffc7b9-1ae2-49ab-a427-6e801c559709",
|
||
"comment": "Retour page précédente",
|
||
"command": "executeScript",
|
||
"target": "history.back()",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7942553c-150e-4d1e-b08f-a6b7fd85b7a2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "bca9409f-280d-4f2c-921e-c2fdf083a5f8",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d1dbf069-1c29-47f6-8914-1eda01fd0513",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9bb07005-ab82-45ff-81ac-02aaa4f329bf",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10 || ${nb_courriel} < 5",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ae9583a9-f535-441f-916b-b8aefaa6e98b",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "64e82f1f-e3e0-43a7-a753-efbe040e32c5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "01bb0073-909b-4898-a7cf-32c8ed6ad1d3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "33b49f19-ba13-4c07-9945-3570c52ba678",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "cf0eba4e-e09e-4d39-b877-02dca2eea1e4",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ac6673a1-f9f5-4e82-9fec-d3ddebe1c0c1",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "07a4a2fb-f3e8-485e-ae48-d5234d9e4502",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "e6b55ebe-157d-4ba8-81fe-11f1a1a67942",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "97e0aefd-94b0-4345-a30d-ee61d03329a5",
|
||
"comment": "Adresse courriel",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "81e60c6d-958e-46d2-8f88-31dff40cab13",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "b29cb9d7-1f86-4eb1-8d98-97b89fe6315f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "0f06e6e3-4c8a-4f49-9f37-fc12a8a1a709",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "b117fc6c-2c7c-482c-ab56-fc5cc7a965cb",
|
||
"comment": "Saisir courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "41a7b26e-7ae7-4e03-a920-0090c59c7558",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "9557e2b8-ea01-41b0-a532-b9558a914f7f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "3e53a929-cc99-4d06-9c2d-cf08f4067e56",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cc3345f7-560b-4e12-81bf-6adb2f4c3a6c",
|
||
"comment": "Choisir un courriel unique",
|
||
"command": "executeScript",
|
||
"target": "function nbocc(elem, tab) { let nb = 0; for (const e of tab) { if (e.localeCompare(elem) == 0) { nb += 1; } } return nb;}function getCourriel(tab){ while (true) { let ind = Math.floor(Math.random() * tab.length); let nom = tab.at(ind); if (nom.length > 0) { let nb = nbocc(nom, tab); if (nb == 1) { return ind; } } }}return getCourriel(${lescourriels})",
|
||
"targets": [],
|
||
"value": "ind_courriel"
|
||
}, {
|
||
"id": "ba787d93-897c-4db6-bcd7-567f26d6b658",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.at(${ind_courriel})",
|
||
"targets": [],
|
||
"value": "courriel_cherche"
|
||
}, {
|
||
"id": "cf6baaa9-7abf-4185-a20d-f55922ed7745",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.at(${ind_courriel})",
|
||
"targets": [],
|
||
"value": "numero_cherche"
|
||
}, {
|
||
"id": "7af206dc-09a0-4edd-8ffc-e69c35594907",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${ind_courriel})",
|
||
"targets": [],
|
||
"value": "nom_cherche"
|
||
}, {
|
||
"id": "24dfdf59-92ea-4f7f-bb29-45b98f68f0eb",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "1a635b2a-375b-4e02-a7b2-e5f63c127bb0",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${courriel_cherche}"
|
||
}, {
|
||
"id": "8c206463-713f-40a1-9bc9-a01823d6e6a7",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f84b3700-3470-4dda-8c5a-1aa8a73f85f8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "58a59c2a-ea92-4389-81d9-8ce2875d458e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${titre_page}.startsWith(${nom_cherche})",
|
||
"targets": [],
|
||
"value": "ok"
|
||
}, {
|
||
"id": "b67f4be7-6899-4068-872d-ead48c11532e",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "ok",
|
||
"targets": [],
|
||
"value": "true"
|
||
}, {
|
||
"id": "78284d24-4a14-4c7e-9197-a07adcc88fcf",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(., \"Numéro de membre\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "numero_trouve"
|
||
}, {
|
||
"id": "65d3c2d4-e971-4adc-a6bd-c045a94ae2e8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(., \"Nom & prénom\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "nom_trouve"
|
||
}, {
|
||
"id": "f766091d-6acc-41cf-b801-a1c7d8592fc7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, 'mailto:')]",
|
||
"targets": [],
|
||
"value": "courriel_trouve"
|
||
}, {
|
||
"id": "7577ea10-15f8-442e-a0e1-6a45818f5b4e",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numero_trouve",
|
||
"targets": [],
|
||
"value": "${numero_cherche}"
|
||
}, {
|
||
"id": "8bd9a8ff-f72c-4548-a0d5-89484bbdb2a7",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nom_trouve",
|
||
"targets": [],
|
||
"value": "${nom_cherche}"
|
||
}, {
|
||
"id": "baa7670f-152e-4dfa-8e0c-3a0773cc0753",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "courriel_trouve",
|
||
"targets": [],
|
||
"value": "${courriel_cherche}"
|
||
}]
|
||
}, {
|
||
"id": "61d20306-ee4b-4221-a7b4-2c39558e4c74",
|
||
"name": "5-22 chercher courriel absent",
|
||
"commands": [{
|
||
"id": "e02d52e7-a754-4192-a0fa-878904428cc6",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7e40c18f-f726-4ac3-83c0-2aad9c42f122",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "c7feecd9-3853-44b4-8857-a33ed2edada4",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "514c3838-255e-4ea4-9b64-6b963439c14b",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b71669da-f541-4a9f-8aeb-c0caef6a9b90",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "5bfe1b57-bbab-41ac-83ce-844b96f3c4a7",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "83913c37-9a30-4bc0-8bbf-31366b30e7c4",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3d90c1ed-6911-4707-8589-5a8a0cb650d7",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "10762c80-fe25-4290-8d3c-bcb9f35c784f",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a7263269-271e-4110-a769-2a729909ffae",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b137c64d-f2c7-4012-8b72-577b1767e63d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "c6292eff-bfc0-4f0c-9f3f-6665c2c54cd2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "b9b2966b-3434-41f8-994c-fa536f44c9fb",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8db30600-ba49-415e-a3d5-6f698a9f55ab",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "548cf1bd-e6ae-4db7-81a4-7b446658571c",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "4a032367-1f97-42a5-87d8-571502ff1064",
|
||
"comment": "Init liste des courriels",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "4e280d12-08f5-40cf-a1e0-c3e39aa1f308",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a41655d3-8cf4-416e-b86e-cbb0ae58d90e",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "e55ef599-6971-492c-9cfa-3ad16bcac775",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "0d204ee0-2906-400a-9a0f-dc857f0a2662",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "2be19f99-9e8f-4ee1-8420-9027960b0492",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "9eb8ed2a-2338-4737-92a5-57a045800aca",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0cdb4ace-7222-4261-9d63-3102b5837f37",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1fa3adf5-2568-47df-9a14-ab2291356f77",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2e8ffc9d-1550-4d4c-a203-e7af66525bd0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "dd3ec5e6-3e20-4eb4-84f6-4d86179a277b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "2f211e8f-84f0-40cd-8c08-a1eafa0ae6a3",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "392c2564-0ef8-454f-998f-1374a9ab9772",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "27dc69e4-d799-45fa-bf1a-fa7bddefd436",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "40da012a-ee3c-4935-9f28-ef214bd4edff",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "09953410-8355-4ae8-90f8-d0bf0c64a2bc",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "70e8305b-a2fd-4760-bde1-59224382ca04",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "b955917a-e434-41eb-aa80-1e05a91fe4db",
|
||
"comment": "afficher fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e72f2f87-66a6-482f-8bff-9dbd86fdd8e3",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "mailto"
|
||
}, {
|
||
"id": "445ecace-22fa-4da4-9012-afeffe2a9754",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${mailto} >= 1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "599ad1fb-d72b-4363-9a2c-1e0cb3a740d1",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "26ba5f25-2911-4bd3-91b3-9c809bfb9ec8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_courriel} + 1",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "79a2cae6-ede5-4116-8f5e-b9924c5eb1a8",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "07b9e213-1845-4df8-b2c2-2740c805a021",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "c248553b-1e2d-42d1-9834-fec34eb12f3a",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1337011b-7cd7-4bd5-bb58-503b4ebe8fb0",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "6644c0a0-3d1f-4c0c-849c-ca3dbc0d830b",
|
||
"comment": "Retour page précédente",
|
||
"command": "executeScript",
|
||
"target": "history.back()",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7f43c784-2a4e-4dad-bb77-108a90562fa1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "75d1a9df-fb6b-470a-b66b-6be4fa897c53",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cf21dd94-4af4-4596-8df6-2d86ba6957ca",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7e932020-d92b-46d2-b415-91126ac875f2",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10 || ${nb_courriel} < 5",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e75913c3-78ce-409d-9a3b-3534e07c1197",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "953a87b9-8235-44f6-8fd8-b74639bcfeca",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "39e2a8ed-b63a-482d-9320-22311cbb46db",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "a9bd5863-9789-4b40-a0a2-4eedc150a330",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "1ebda4f8-90b8-4d2b-957f-6610dbab4af3",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "31d901c8-822f-474f-857e-20c7171a9141",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "640a625a-4a97-4d94-bdf3-6f135841a722",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "6f8d0e59-ab75-4488-bcb4-36056e52e620",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "4d3f42ce-b270-4beb-9c2d-a6980ffcce1d",
|
||
"comment": "Adresse courriel",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "9c39e09f-f248-4c36-9a3e-06d0409a41ea",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "6ad64591-a08f-4a04-839a-41e618f6ad3e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "f12d0d21-b29e-43af-9881-108bbad6cf2a",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "b9b44171-c1ec-4177-92f9-d7b8fbf96c14",
|
||
"comment": "Saisir courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "33f860c0-4e9c-4f06-ac6c-e3a810b80b95",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "22c33063-1e69-4d5e-8c48-f5d19c57a18d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "53168b36-364f-4868-8e3c-26e6eff51676",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "aabe9d62-8ddf-415b-9e02-11ead0c09299",
|
||
"comment": "générer un courriel absent",
|
||
"command": "executeScript",
|
||
"target": "function nbocc(elem, tab) { let nb = 0; for (const e of tab) { if (e.localeCompare(elem) == 0) { nb += 1; } } return nb;};const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str;}; function genererCourriel(tab){ while (true) { let courriel = chaine(8) + \"@\" + chaine(5) + \".fr\"; let nb = nbocc(courriel, tab); if (nb == 0) { return courriel; }}}; return genererCourriel(${lescourriels})",
|
||
"targets": [],
|
||
"value": "courriel_cherche"
|
||
}, {
|
||
"id": "a09a0f14-3cb9-453d-af28-a4aee9dc26ee",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "0cfe5606-3afc-49a0-8dd5-58c1fd81938c",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${courriel_cherche}"
|
||
}, {
|
||
"id": "563825bb-0ba7-4330-b9b2-b976b1fcb26a",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "c120fc06-cdea-4819-b56d-fc54526273f9",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "96284daf-f6f7-4abd-acb2-41e82f8e0b59",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "59176623-95f1-407c-9bd0-3c187bc55217",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tbody/tr",
|
||
"targets": [],
|
||
"value": "nb_res"
|
||
}, {
|
||
"id": "097d4f8b-b841-457c-8d58-a3a204bc6d56",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_res",
|
||
"targets": [],
|
||
"value": "0"
|
||
}]
|
||
}, {
|
||
"id": "e47f2275-c9d9-4183-adf7-ca74b5b9cd75",
|
||
"name": "5-23 chercher courriel plusieurs résultats",
|
||
"commands": [{
|
||
"id": "3cd64e62-4488-4ab8-8745-0844e28ab95a",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6d66e1b8-bdfb-4ed4-a562-35d1a84492da",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f753440b-da17-4c79-9dcf-ce7712f7f903",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "a53adafe-21a3-475b-8c7c-3edf39d549d0",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "767fb783-a48f-4f51-a56e-0b9f012a07e6",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "8689f891-229d-4455-ba2f-063715257e0a",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "7a02d62d-c635-4ee1-ab32-eb656784de5b",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "44ae26eb-c250-4bd6-9987-92b1443cfdac",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "dc86e6bb-b335-4695-a1eb-86ad00f00d26",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "29de96f0-b669-47a4-b8d4-109adbb7ce49",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "891f2379-8018-407e-a655-8a2bef31e65e",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "f56ff1ab-6485-49f2-a905-8c9f63e3fb44",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "8784c411-a100-4275-915d-fad72de4e043",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d5322b3f-be1b-4d76-8ad8-1ee7bb11a11d",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "dbcc0afe-5a3d-4d54-bddd-bb28c57b5fab",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "4144c0f7-2108-458a-a97d-ed9937ad19ca",
|
||
"comment": "Init liste des courriels",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "b5c439c1-6b30-40b0-8322-535016441292",
|
||
"comment": "Traiter les membres déjà présents",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "24d766f0-237a-4d17-a281-401794706f73",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "ec0c858e-649d-4d63-a510-287e92d0c00e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c06a1a28-c8d1-408d-abea-286e24a860db",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "301ff0c8-f77c-41c5-9924-de503e4810e6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "f0a4affd-6807-4eeb-8509-d7771d4b4186",
|
||
"comment": "Parcourir les membres enregistrés",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cfbb1008-7696-448d-93fb-5f6730e3ff4b",
|
||
"comment": "fin de page ?",
|
||
"command": "if",
|
||
"target": "${num} > ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3a18725f-5b3d-407c-97ee-0ce1f37cd757",
|
||
"comment": "passer à la page suivante",
|
||
"command": "click",
|
||
"target": "xpath=//li[@class=\"next\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "075211e0-a2d0-4c66-b466-5a237e546ad4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_membres} - ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": "nb_membres"
|
||
}, {
|
||
"id": "012307ce-899a-4c7a-8987-e8dd64dbda55",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "cd3671a1-cf90-4d02-bef1-33434a04c93c",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "070bd92f-19ed-4d71-82f7-cdb0c9c895aa",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "70101152-e8bb-4055-acce-6f1a459f99ab",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "6734754e-ab54-49a5-b71d-1152a621ee28",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "9a535a9d-3064-41ba-985c-95eb237d9c30",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "ab3e96a4-af3c-49ac-97d6-73eb6422c162",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "840acc47-f8d2-4ffd-8aa8-95a2f3660332",
|
||
"comment": "afficher fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "51ba3835-fc96-42bb-8ab8-fadac8840f52",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "mailto"
|
||
}, {
|
||
"id": "67620158-6428-4cc7-8196-cbe9cd505f1c",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${mailto} >= 1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "702d0947-e65a-4659-9c62-c336e5282195",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, \"mailto\")]",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "8b3e2a8a-93eb-4b10-9bb9-6d25937020b0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_courriel} + 1",
|
||
"targets": [],
|
||
"value": "nb_courriel"
|
||
}, {
|
||
"id": "1a2b0ab7-408a-406c-9493-f9199c1a8486",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0d1e416e-b8db-448f-a92b-5dfcb9bb56c3",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "249df462-1687-4276-8033-a6b8ae28032d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e853afe2-1d94-444d-a7ac-1c5efa5a62a5",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "479121e2-f411-44f8-834a-8a558325810a",
|
||
"comment": "Retour page précédente",
|
||
"command": "executeScript",
|
||
"target": "history.back()",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b713eafa-c245-4888-b50b-7f74af375faf",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "d9a403e6-4afb-4f83-9062-b14e54f3afe3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a0d80163-9c90-4e0a-a7c1-6fcc4240f083",
|
||
"comment": "Générer de nouveaux membres",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d72c968c-3e15-43f1-8d1c-dc42c54a4a40",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10 || ${nb_courriel} < 5",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f6ab4743-3ff9-4819-966d-da9b96a66198",
|
||
"comment": "Ajouter nouveaux noms à la liste",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(11 + Math.floor(Math.random() * 5))); } return ${lesnoms};",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "dab4b8f7-2d55-4f1d-a22b-c714bd43320e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0eceaf4a-d576-4408-a7ec-42cd0cc58511",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": "nb_noms"
|
||
}, {
|
||
"id": "857a19e9-7027-425d-8fc8-f90711cd0461",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres}",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "c355a165-8964-4302-a8da-1c51d0eb8d1a",
|
||
"comment": "Enregistrer les nouveaux noms",
|
||
"command": "while",
|
||
"target": "${i} < ${nb_noms}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f6355f27-b6aa-438c-9db8-cc11a383754e",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "fffd88db-1e2b-4ecf-9c4f-4c2f4a3da0ba",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "b62cf6fa-6eef-4397-813a-f253697d2c72",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "1bacf0ff-0b97-40b2-bc35-e45396174ba0",
|
||
"comment": "Adresse courriel",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "b3fc611d-0c13-466e-a1a2-e920cf1c1f2a",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "8b961fdf-6995-4339-bcbf-052d65262856",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.at(${i})",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "d8b21ad5-51c4-472f-b78c-baeca213ef59",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "6bdb043d-8b2c-4216-a56e-692181abb884",
|
||
"comment": "Saisir courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "c44dd1f9-0b55-4fa5-b060-9e9e75bea739",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "bbdad134-7e20-4ccb-bce3-69ead97bab26",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "18aed5a7-d552-4030-920e-7d23c0506222",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f995ceaa-6e2f-4e3a-b954-09b2cda90f0e",
|
||
"comment": "Ajouter un courriel homonyme",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d3a5501c-2047-427c-9f82-ee25921c000a",
|
||
"comment": "courriel à chercher",
|
||
"command": "store",
|
||
"target": "@free",
|
||
"targets": [],
|
||
"value": "courriel_cherche"
|
||
}, {
|
||
"id": "7a443da9-d994-4d41-8ef2-bcd44096c9f1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "function homonyme(chaine, lg) { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < lg; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str + chaine + \".fr\";}; return homonyme(${courriel_cherche}, 9);",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "79117715-f96b-4e0b-82f9-99409323f662",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ba063acf-a0cb-4738-82eb-0fa538ad9e30",
|
||
"comment": "Mémoriser numéro de membre",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "f91d11c1-7f66-4103-b907-fac58393f541",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(${numero})",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "7df2bb5f-c729-4ed5-8e9a-7798118f000f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);};const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(11 + Math.floor(Math.random() * 5));",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "2c3ff064-547b-4701-8975-1a3726d84904",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nom})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "cf4f24fe-6096-4ce9-a1ec-47c08c493a50",
|
||
"comment": "Ajouter courriel à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lescourriels}.concat(${courriel})",
|
||
"targets": [],
|
||
"value": "lescourriels"
|
||
}, {
|
||
"id": "be9eebec-c9f7-4a15-9a8f-21ec3e82acb7",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "f56d45b7-6f62-48e5-8d66-13984dfb61b8",
|
||
"comment": "Saisir courriel",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "2d62f843-3610-41e9-9ac4-1a98d83b5f5a",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "cf66472a-a259-4948-aadd-b46dc6eb52f4",
|
||
"comment": "Trier les membres par nom croissant",
|
||
"command": "executeScript",
|
||
"target": "function trierNoms(tnoms, tnumeros, tcourriels, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; o.courriel = tcourriels[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros}, ${lescourriels});",
|
||
"targets": [],
|
||
"value": "membres_alpha"
|
||
}, {
|
||
"id": "81b1ce8b-854c-449e-94eb-3f8a4412dffb",
|
||
"comment": "indices des homonymes",
|
||
"command": "executeScript",
|
||
"target": "function indonymes(chaine, tab) { let homos = []; for (let i = 0 ; i < tab.length; ++i) { if (tab[i].courriel.includes(chaine)) { homos.push(i); }} return homos; }; return indonymes(${courriel_cherche}, ${membres_alpha});",
|
||
"targets": [],
|
||
"value": "tab_pos"
|
||
}, {
|
||
"id": "32b2ae44-42f1-4bff-a698-813af7edbc2d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${tab_pos}.length",
|
||
"targets": [],
|
||
"value": "nb_homonymes"
|
||
}, {
|
||
"id": "287ec7c5-8349-499a-abc8-e666ba21cef4",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [
|
||
["css=.current b", "css:finder"],
|
||
["xpath=//li[2]/h3/a/b", "xpath:position"],
|
||
["xpath=//b[contains(.,'Membres')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "a32e376e-8b67-4056-9873-b5c221266ad1",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "name=qt",
|
||
"targets": [
|
||
["name=qt", "name"],
|
||
["css=fieldset > input", "css:finder"],
|
||
["xpath=//input[@name='qt']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${courriel_cherche}"
|
||
}, {
|
||
"id": "d43d8af9-7f48-4ed8-bdcc-ef57abef5bbe",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[@type=\"submit\"]",
|
||
"targets": [
|
||
["css=.icn-btn:nth-child(3)", "css:finder"],
|
||
["xpath=//button[@value='1']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "f792d5d5-5e7a-4d9d-8e37-7c8aaeb7d1e8",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//header/h1",
|
||
"targets": [],
|
||
"value": "titre_page"
|
||
}, {
|
||
"id": "9e5380d3-7223-4c4b-ad82-04b90fbb8181",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "a017a997-215b-41b5-8b39-905eb7f06194",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//tbody/tr",
|
||
"targets": [],
|
||
"value": "nb_res"
|
||
}, {
|
||
"id": "88174e50-bfb8-4f17-9250-887c01a12438",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_res",
|
||
"targets": [],
|
||
"value": "${nb_homonymes}"
|
||
}, {
|
||
"id": "8c038202-8097-452e-ad25-f4a31cd18329",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "titre_page",
|
||
"targets": [],
|
||
"value": "Recherche de membre"
|
||
}, {
|
||
"id": "0f196bd7-8db8-458d-bb9d-b48b5f6a9370",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "04a270e5-dc4e-436d-b591-cd6ff52a04dc",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} <= ${nb_res}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "21347a5f-5ad1-425b-910e-08d5a96d4a41",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${tab_pos}.at(${i}-1)",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "60f51c4b-a2c1-4e84-86d2-cd0ca67fc913",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//tbody/tr[${i}]/td[2]/a",
|
||
"targets": [],
|
||
"value": "nom_trouve"
|
||
}, {
|
||
"id": "2e36f65a-7926-42d1-b0f3-5cadbdc2a746",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//tbody/tr[${i}]/td[3]",
|
||
"targets": [],
|
||
"value": "numero_trouve"
|
||
}, {
|
||
"id": "bbb16405-7b14-4bdf-81cb-4d0660ddcddf",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//tbody/tr[${i}]/td[4]",
|
||
"targets": [],
|
||
"value": "courriel_trouve"
|
||
}, {
|
||
"id": "b37e24cb-ffa8-411b-b302-8911dc18dcf8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${num}].nom",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "b9e442bc-83d4-49e5-a4a4-07c82657657e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${num}].numero",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "080edca2-807a-43f3-85b8-86621de9b4af",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${membres_alpha}[${num}].courriel",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "24238f1f-ec76-48d8-8cba-0c35c864631c",
|
||
"comment": "vérifier si le courriel trouvé correspond à la recherche",
|
||
"command": "executeScript",
|
||
"target": "return ${courriel_trouve}.includes(${courriel_cherche})",
|
||
"targets": [],
|
||
"value": "ok"
|
||
}, {
|
||
"id": "036aac50-e85b-4d5c-89d9-44b7f6546079",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "ok",
|
||
"targets": [],
|
||
"value": "true"
|
||
}, {
|
||
"id": "1ce23fbb-2940-44b5-9bcb-769b9e861604",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numero_trouve",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "5c7d53be-7452-47aa-ad73-bb91d8196e5c",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nom_trouve",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "8a87dfe8-3059-4311-8f76-5a1d77ef82be",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "courriel_trouve",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "678c6a53-2605-44f4-9b99-db4f708d8388",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "5d307308-5ddf-4e16-8d4d-a9c2e8c0e50d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "13254e39-41ef-4909-ac46-f8ad0174d1b0",
|
||
"name": "6-01 supprimer membres",
|
||
"commands": [{
|
||
"id": "7b7f03ce-df0a-4b93-a99c-abefe98071c3",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5bb17df6-1d73-41b3-8ae7-4898f8eac945",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "750500be-d0f0-4642-99dc-5269f59f8f67",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "ad59e5a0-88bd-4139-acac-0f9bd8d03495",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2cbc64e5-65a4-4f10-be1e-d2425fee25e8",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "ac03d879-3520-43a4-8c02-9aa91c87bdec",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "663dacfd-daaf-458b-9dd9-6c2dbe1cc0fb",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e43b3fc6-007f-4f6e-a887-1dc78ca91163",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a6991161-06d8-4f1a-8e25-da9c82e04673",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8297e0b5-a68e-472a-b09c-6dedd0d79c69",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "6b81cc1f-3dd0-426c-a9e3-fe7192d8e389",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7f83a3af-4efc-4fe4-991c-7f0cbb0b60d7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "137549b6-1daa-44f3-b2a1-10025c5bd579",
|
||
"comment": "si pas assez de membres",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 10",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e492b364-ac84-4776-94f5-ee367ae80c55",
|
||
"comment": "Générer de nouveaux noms",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length));} let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin; }; function genNoms() { let lesnoms = []; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { lesnoms = lesnoms.concat(chaine(11 + Math.floor(Math.random() * 5))); } return lesnoms;} ; return genNoms();",
|
||
"targets": [],
|
||
"value": "nouveaux_noms"
|
||
}, {
|
||
"id": "c0a439e2-3bd9-4e6e-9304-87d152e83326",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "dde8c376-a464-4381-b349-71805074c226",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} < ${nouveaux_noms}.length",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ebc07853-53c9-4d87-9404-018e1b55198c",
|
||
"comment": "Menu ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "728b9a2e-6817-4e45-9c80-146e73fbcc94",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nouveaux_noms}[${i}]",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "27b8d889-2691-4f9b-aed6-cd58ed6b6fec",
|
||
"comment": "Saisir le nom",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "3a3e8f07-2ac9-41f6-ac0c-e9ec68316187",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "c52180b1-cb0f-4194-9834-808ec9908dec",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "81f36c97-4ca3-4d92-bba0-48795dd49108",
|
||
"comment": "Enregistrer les infos",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "79e43592-d573-47c7-b458-4b7144db22f3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "8a90fbf2-c11c-4055-afe8-9d954eb620cb",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "80f7acd0-9b78-46bb-9025-f65eec454425",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f8624ab4-b57c-4ba1-894d-6d7bbe147b7b",
|
||
"comment": "menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "60331a57-2fab-4056-a2e4-4814d55d2e71",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "493a86b0-6932-4528-8bea-9ba15a72f79d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "5b0f7a5c-5df9-4447-ac0d-9bb959c3542d",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "1d54e3d9-e9ac-431a-9dc4-cacd45ce7efc",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "56f815b2-5098-4368-8cd2-00c1d37a67a6",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span",
|
||
"targets": [],
|
||
"value": "nb_membres_page"
|
||
}, {
|
||
"id": "2099ff67-9379-4aa9-91fa-0f00fe5b2800",
|
||
"comment": "Init liste des numéros",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "71980e02-45e4-4ce7-974a-ebf85beac023",
|
||
"comment": "Init liste des noms",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "e118b9d2-559b-4dfd-9b80-8eeb3ddd2f1d",
|
||
"comment": "membres à supprimer",
|
||
"command": "executeScript",
|
||
"target": "return []",
|
||
"targets": [],
|
||
"value": "asuppr"
|
||
}, {
|
||
"id": "1e851388-993e-45f1-92d1-81b34e319727",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "nb_suppr"
|
||
}, {
|
||
"id": "1f778544-8440-4b49-bcf6-9ac2c65c088c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "4e7edd50-adfa-47b6-874c-2620fa956d69",
|
||
"comment": "Parcourir les membres de la première page",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_page}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "55ea43c6-3fca-4f45-a76f-a67589636ca6",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "419d4f1f-5ce4-40c6-b58f-81cf663a4500",
|
||
"comment": "Ajouter numéro à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}.concat(Number(${numeroAffiche}))",
|
||
"targets": [],
|
||
"value": "lesnumeros"
|
||
}, {
|
||
"id": "33eff90f-9bf8-4b6f-ad8b-91e2f519dd7d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "1bc57984-510c-44ea-821f-07639dfbbb9d",
|
||
"comment": "Ajouter nom à la liste",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}.concat(${nomAffiche})",
|
||
"targets": [],
|
||
"value": "lesnoms"
|
||
}, {
|
||
"id": "86e7be66-23f6-424a-baba-8fc96e68fff7",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${num} % 3 == 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a6674525-f3e4-4df7-9410-464aff309c78",
|
||
"comment": "",
|
||
"command": "check",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//input[@type=\"checkbox\"]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e5203340-d563-4b27-b32a-7b6b99e021eb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${asuppr}.concat(1)",
|
||
"targets": [],
|
||
"value": "asuppr"
|
||
}, {
|
||
"id": "d2762532-28c1-4601-9529-5c4fc6352aea",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_suppr} + 1",
|
||
"targets": [],
|
||
"value": "nb_suppr"
|
||
}, {
|
||
"id": "33e574c5-e13a-40da-8ba2-274e5b602cbf",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7f9ecdd8-4211-453e-8e88-b70aa4cc2560",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${asuppr}.concat(0)",
|
||
"targets": [],
|
||
"value": "asuppr"
|
||
}, {
|
||
"id": "485f99ff-0f5d-4db7-a250-855b44eb46cf",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5d11c986-9605-473a-9a76-b0774b9391cd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "2ae54773-d9a1-49aa-89c3-35e0cce81772",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9401aa63-a87c-4cc1-9294-1dc441d5bd3a",
|
||
"comment": "Supprimer les membres sélectionnés",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "37264356-96c6-4c32-8390-055adbc5efb6",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//select[@name=\"action\"]/option[contains(text(), \"Supprimer les membres\")]",
|
||
"targets": [
|
||
["name=action", "name"],
|
||
["css=select", "css:finder"],
|
||
["xpath=//select[@name='action']", "xpath:attributes"],
|
||
["xpath=//select", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0f1f593-368d-4e8f-b305-9f5d99f9f4eb",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "9ac82f5b-7206-448f-baf0-98d2337db68c",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "name=delete",
|
||
"targets": [
|
||
["name=delete", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='delete']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Supprimer')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8f2ad379-bcf6-4729-b7f9-592d31b44cb1",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9134a9df-c731-4a24-bf72-37f281c95903",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "//executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "36e6ebf2-46bb-486c-a024-da720132d872",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7fea960d-3c8a-4b09-a21d-6d7a537bc60c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "membres_restants"
|
||
}, {
|
||
"id": "34001b9d-78e0-4ecd-84d6-e34784cc6c84",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${nb_total_membres} - ${nb_suppr}",
|
||
"targets": [],
|
||
"value": "membres_restants_oracle"
|
||
}, {
|
||
"id": "511506e2-6636-4233-9197-8f9fb85e45b5",
|
||
"comment": "Vérifier les membres restants",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "387e771f-add4-4f95-bb37-e835d15845f9",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "membres_restants",
|
||
"targets": [],
|
||
"value": "${membres_restants_oracle}"
|
||
}, {
|
||
"id": "81f294fe-0998-4d48-b6c7-3108bb610904",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "86508d96-3c91-4b21-9041-5f87b1ed31b2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "fd05b06f-4ea9-469a-af2e-d6b7c6383e9a",
|
||
"comment": "Parcourir les membres de la 1ère page",
|
||
"command": "while",
|
||
"target": "${num} <= ${membres_restants} && ${i} < ${lesnoms}.length",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b84f7c00-6766-4a95-8632-ed4ff7f1ffbb",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnumeros}[${i}]",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "91cd2fc0-a38d-4f4f-b8c7-0b069943de13",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${lesnoms}[${i}]",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "05f92014-6a86-4a35-8c18-2f3bd562c92e",
|
||
"comment": "",
|
||
"command": "//executeScript",
|
||
"target": "return ${asuppr}[${i}]",
|
||
"targets": [],
|
||
"value": "suppr"
|
||
}, {
|
||
"id": "2a264014-c268-47e6-8f7c-1a1ba2d40902",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${asuppr}[${i}] == 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "97e1be40-6ece-46d2-b393-d7ed4db807f0",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span",
|
||
"targets": [],
|
||
"value": "numeroAffiche"
|
||
}, {
|
||
"id": "281e5c73-5396-4780-a2e7-424f97d7a03c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/th//span",
|
||
"targets": [],
|
||
"value": "nomAffiche"
|
||
}, {
|
||
"id": "46e7ccb5-9480-4d4e-beff-df37cf89e4a6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${numeroAffiche})",
|
||
"targets": [],
|
||
"value": "numAff"
|
||
}, {
|
||
"id": "26db6524-cf1f-4301-974e-e1420ec5ee1a",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "numeroAffiche",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "f9512e6d-e3ae-4a8c-aa88-383d3b980466",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nomAffiche",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "66b2b24f-a1a0-4806-8698-d28cbd42ff09",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "c986c2c8-59bd-4de7-be89-09c54ae7c5c3",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1d1b0ffa-efe2-4ad9-93a9-1802928fbd64",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} +1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "df95acad-973d-4ff9-a81a-60c4e8b6f225",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}, {
|
||
"id": "e9ac5acc-6ff2-4523-807e-1316b020d8ca",
|
||
"name": "6-02 supprimer membre 1",
|
||
"commands": [{
|
||
"id": "1f97c921-613d-47e5-bdac-46f191995147",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "00fb3352-3297-44f8-8efd-84b68bf62035",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "168739d7-f0e5-440f-a564-2cc14a993d71",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "6cd5f45b-2fe6-4a25-805e-e2a50a066110",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0958c5ff-7c36-43a5-8bbc-e672aae10dcb",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "235cfae5-9598-467a-8143-bd9b9f6c7b43",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "aaa9ed86-55b1-4ec6-a809-b92a2477ebe5",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bbff11be-b9d2-4379-a093-66e3ed36cb23",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8d355cd1-ab99-4f2d-934f-e922307961e1",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8200f4bf-5659-4c07-80b5-d5ceb774c535",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "54742745-eba2-4afd-80b3-fbd02d3061c9",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "58da6287-1e38-467e-8604-95d12fe10cfa",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "3719b99a-45ba-49bd-b298-2431f340bccd",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_initial_membres"
|
||
}, {
|
||
"id": "59643ed8-bebf-42a8-aa33-4fe2d2e12250",
|
||
"comment": "",
|
||
"command": "check",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody//input[@type=\"checkbox\"][@value=\"1\"]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b795d85a-6b5a-46b6-8f1e-53f7c6451d2e",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//select[@name=\"action\"]/option[contains(text(), \"Supprimer les membres\")]",
|
||
"targets": [
|
||
["name=action", "name"],
|
||
["css=select", "css:finder"],
|
||
["xpath=//select[@name='action']", "xpath:attributes"],
|
||
["xpath=//select", "xpath:position"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "afc28a43-1f49-4351-8d8c-426425d07ae3",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "19e6305c-e7cf-4969-89f6-181a0593019b",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "name=delete",
|
||
"targets": [
|
||
["name=delete", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='delete']", "xpath:attributes"],
|
||
["xpath=//button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Supprimer')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "8aeba682-cb10-43ed-b2bf-577230f432af",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//h1",
|
||
"targets": [],
|
||
"value": "msg"
|
||
}, {
|
||
"id": "c640734d-595f-4773-868f-cbce8e0dbca8",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "msg",
|
||
"targets": [],
|
||
"value": "Erreur"
|
||
}, {
|
||
"id": "33d41f29-6ad5-403a-bdd0-36d633ef1096",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [
|
||
["relative=parent"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "ae00d922-eccc-4e00-9c7a-02289c05dc92",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//button[contains(@class, \"closeBtn\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8da6be2b-7c62-4266-88b2-46e894f2dbf4",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "5c9793d6-751b-4e17-9151-09fb0b737a0d",
|
||
"comment": "Rendre visibles les options du menu Filtrer",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); var nb = li.length; for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f2dd9118-10f0-4570-9163-dd0662018d59",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ceea15ae-7871-4d5d-a680-fdd7611d6731",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "aefe30e3-30f9-48d8-92e9-338782976eae",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_final_membres"
|
||
}, {
|
||
"id": "e7d33fd2-0a2d-401e-a9ae-eacf569e04d7",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "nb_final_membres",
|
||
"targets": [],
|
||
"value": "${nb_initial_membres}"
|
||
}]
|
||
}, {
|
||
"id": "4c95e2ee-667c-4e1b-b55b-4cc92eda3c6f",
|
||
"name": "7-01 modifier membre",
|
||
"commands": [{
|
||
"id": "b35ae151-79f6-45f9-a3cb-82e2c2fc0c86",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "58cde292-0197-4c8c-85e2-8ba1e9cab413",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "53d86b7d-c442-4ab4-a6fe-e410a18fb6b8",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0a16bbb-5731-48aa-b81e-3c0731bbc503",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "f03c7d38-d087-4a99-8822-7befd511a558",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "cdf1b33b-f7dc-4342-abe4-67afa1b7f226",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "caef19cb-dd4e-438e-9d80-bee10a7e3bd5",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "54822399-089b-4c58-a228-8e09d9578801",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "19142f61-2dd2-480a-87e6-c0eac635920f",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cc7903e2-0432-42f6-878f-2b87bc5fa120",
|
||
"comment": "rendre visibles les catégories",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "73a108aa-4752-4d3e-9176-1df9277a30a7",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7ebbca1c-7e96-4e8b-87f0-f3503c86c3e4",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "7d1b7c91-af85-4929-aacc-6e56dd62d9f4",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_total_membres"
|
||
}, {
|
||
"id": "2c3ec859-bf79-49ff-977a-47875ac84ecf",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_total_membres} < 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d96447d2-12b6-4ceb-a45e-ff50a80b6108",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "b85297e7-d532-4c45-b3ee-46a7a928296e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4298482f-6cab-4189-bbc6-81cf2c393b33",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "e7d314c9-348a-4851-bb9d-31a9299a7501",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "42e9811c-cc4e-4c94-886c-6fa31f6fa844",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "44f97500-bf5d-49da-9477-cdc3ef54ffff",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "777 rue des arbousiers",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "c0d55074-57bc-4d26-9bc4-0d9353d00b5d",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "fb1d5847-441b-4508-94cd-c9b9b3648695",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "3e8021a9-aa54-49db-8a5e-9b5ff8aa1e86",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "1d919b5b-3980-403b-9891-0f0b5ff8a9f8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "a41c276f-ccfd-432b-8648-72862d2a935e",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "9d6b7fcc-0cc6-4733-bea9-180c0009c608",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "c7a0ec7f-508a-4332-9581-e9f79002a8d9",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "7471e6ed-2cac-4387-838d-1431a1cb65d7",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return Math.random() * 3 < 2",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "b8e21864-ff84-4d35-8358-573bacde6b46",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "003abdb7-1bbd-4e90-96bd-501b9a193304",
|
||
"comment": "",
|
||
"command": "check",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0186833-9b94-475c-8878-51c19d38cc3e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d7f05c74-3548-4515-8b23-6046336cbe3f",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "b7f36dfb-dfc6-46b4-a685-a1ad4f3405f5",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "a9b78a9a-343d-434b-8e60-14b053b30db2",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cc549298-02fc-4486-8e2e-abc43148afb4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "57a5bb7d-857d-4200-82ce-557826a7c6cb",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "19b38b65-7fb7-4833-b3ec-ee4f6b8f534b",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero_dispo"
|
||
}, {
|
||
"id": "be5e1cdb-9a79-4729-9604-c77071babf6a",
|
||
"comment": "chercher un membre à modifier",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "081bf0e2-5103-49b9-9aa4-3f20edeb2557",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "377e34ca-e626-426b-ac64-4f91af70075a",
|
||
"comment": "rendre visibles les catégories",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "49bd5431-6f58-4df8-b100-50d318ffa6e1",
|
||
"comment": "Filtrer : toutes même cachées",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Toutes, même cachées\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0798a6d0-ec37-4568-9a7d-9bba957217d0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "aeb913fb-edd5-4b22-b207-07eb34a4f8b0",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "fini"
|
||
}, {
|
||
"id": "569bae03-b28a-4c6d-89a6-734f91110ae1",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_total_membres} && !${fini}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cb84eed6-1200-4295-9a77-a2ed84e5653c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[@class=\"num\"]",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "b2349360-2313-473e-96be-b82b01ce5b05",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero} != 1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9df972f6-370a-4a89-b885-fad3e950d8e3",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "fini"
|
||
}, {
|
||
"id": "b67ebb66-406c-4511-a84e-811bacf0d5d1",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8f518c4b-f88a-4128-80c5-83fe21c38b59",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "44123c95-1aed-490d-a875-3663896b1fb4",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "81febe43-014a-4cc7-84d4-433234999b4e",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a62c0cff-0e34-46e2-8812-d07d9381fcaf",
|
||
"comment": "fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[@class=\"num\"]/a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a34a4182-eca7-4049-8d03-1f6cd9aac92c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "96f0b4ae-8940-42e7-81e0-f9e7b55d1c73",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(text(), \"Inscription à la lettre d'information\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "lettre_info"
|
||
}, {
|
||
"id": "19d0e01c-86e2-47e1-ac81-f18024d4b6bb",
|
||
"comment": "modifier le membre trouvé",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, 'edit.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7cd950a7-0de5-44ba-95e4-9d9f14c7ba40",
|
||
"comment": "choisir une catégorie différente",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d0bc88b2-86b6-4aa5-aa6c-c9b8bd0ef674",
|
||
"comment": "",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option",
|
||
"targets": [],
|
||
"value": "nb_categories"
|
||
}, {
|
||
"id": "9d71b6ca-492e-4ba9-a011-14e3c2a593b2",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "4f0db2a9-eb13-4d68-9aeb-b57ac94c5394",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${i} <= Number(${nb_categories})",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2feae876-813f-4250-8594-b8b7d0c7b76f",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[${i}]",
|
||
"targets": [],
|
||
"value": "newcat"
|
||
}, {
|
||
"id": "e8e6e7ff-fa80-4e8e-af09-e6778a9425e1",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${newcat} != ${categorie}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7bc0f2cb-412a-48b7-afda-ed2df9c30fda",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1 + Number(${nb_categories})",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "1d6fb92c-3bfe-4f1a-9bff-6c8b78c4cf26",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9cabbeb5-2a46-40f0-be0d-3e348e9c43d8",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${i} + 1",
|
||
"targets": [],
|
||
"value": "i"
|
||
}, {
|
||
"id": "802a5c07-f07d-4573-a750-4edcae7ddbcb",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "38e1354c-ce25-4eeb-a616-81e4970d539d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "69434c9a-006d-4013-8b01-cf824199cae6",
|
||
"comment": "Modifier les informations",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7b70a43d-1854-4e25-ad8c-1f475b952630",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_numero",
|
||
"targets": [
|
||
["id=f_numero", "id"],
|
||
["name=numero", "name"],
|
||
["css=#f_numero", "css:finder"],
|
||
["xpath=//input[@id='f_numero']", "xpath:attributes"],
|
||
["xpath=//input", "xpath:position"]
|
||
],
|
||
"value": "${numero_dispo}"
|
||
}, {
|
||
"id": "29a07429-03c8-4d6e-b1e3-ed97c43c6d22",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//select[@id=\"f_id_category\"]/option[contains(text(), \"${newcat}\")]",
|
||
"targets": [
|
||
["css=#f_id_category > option:nth-child(3)", "css:finder"],
|
||
["xpath=//option[@value='1']", "xpath:attributes"],
|
||
["xpath=//select[@id='f_id_category']/option[3]", "xpath:idRelative"],
|
||
["xpath=//option[3]", "xpath:position"],
|
||
["xpath=//option[contains(.,'Membres actifs')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "79267fa3-a686-4bc3-9dd1-f9f7a4ebd79c",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "4ab9bd49-aafb-4ea0-ab17-85a09dd5a2d3",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "984fc8ec-4399-4b56-b705-e1e9772e7580",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "2549cc52-26a8-4973-aea5-f49220b4809e",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "81328f49-ba7f-47eb-ad3a-7126063ebb9d",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "2 rue des arbres",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "40d727a1-25b4-4113-bad1-8610ffd87c87",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "09b3ac21-90d5-47b9-b7af-5f121d4fa882",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "624b9914-7892-4a08-91d7-3b429195399e",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "cb456501-8eba-4f37-b466-794291f286a6",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "1744b4e1-901e-40cd-a292-d369002887d5",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "558f336c-5c15-4a7b-8197-1b52f775ccf1",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "e59a1374-406e-4a7e-a82c-8af9f8cd6ee2",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_telephone", "id"],
|
||
["name=telephone", "name"],
|
||
["css=#f_telephone", "css:finder"],
|
||
["xpath=//input[@id='f_telephone']", "xpath:attributes"],
|
||
["xpath=//dd[11]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "8ee35c3a-d0f3-4ff9-9f3d-06e27cbeaa61",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre_info} == \"Oui\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0f8fd81f-0fdf-47a4-97d7-4a6833e8fbb3",
|
||
"comment": "",
|
||
"command": "uncheck",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f390c4b4-5c4b-4f8d-9301-ca27c85d5177",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "4d583db0-20ab-48c5-a52b-ec52b28db02a",
|
||
"comment": "",
|
||
"command": "check",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "53bf2c01-0a83-457a-8196-69c80b92d45d",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0ea360db-72bf-46f6-89f9-2abfed89e167",
|
||
"comment": "",
|
||
"command": "storeValue",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [],
|
||
"value": "date_initiale"
|
||
}, {
|
||
"id": "4651e5e4-dcc8-4ca8-9bf8-f38bcc57259e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "function getDate() { let date = new Date(); let ms = date.getTime(); ms -= 3 + Math.floor(Math.random() * 5 * 24 * 60 * 60 * 1000); date.setTime(ms); return date.toLocaleDateString(); } ; return getDate();",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "59523e87-e3b4-47cf-bc5c-ae1a8915f9e3",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "546a9a8c-f3c7-480d-95b9-0d9ed8fb00d3",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [
|
||
["name=save", "name"],
|
||
["css=.main", "css:finder"],
|
||
["xpath=//button[@name='save']", "xpath:attributes"],
|
||
["xpath=//p/button", "xpath:position"],
|
||
["xpath=//button[contains(.,'Créer ce membre')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "92fd69ee-5a77-461b-9b2b-66db20bc0656",
|
||
"comment": "Vérifier les infos du membre",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b476d841-da9b-4143-9c41-829d3d06c731",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero_dispo}"
|
||
}, {
|
||
"id": "032571e2-2677-4861-ae16-529aeca51d39",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "${newcat}"
|
||
}, {
|
||
"id": "5c07c16b-50a8-4150-8e55-e6031c665c24",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "3387e4e8-a9c7-47ee-b3a6-eeab7176c1fb",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "30b2993b-82f5-441a-bd96-6f67f5bf8393",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse postale')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "354ec327-9717-423d-ad17-b882843c8543",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Code postal')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "9c9466da-0016-490f-90ff-3f1cc5572b00",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Ville')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "2d56c898-5eae-4b13-a0a1-94fa8d2bd6c6",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de téléphone')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "88daa25a-aa99-4d47-a9c2-15ca74c5df46",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${telephone}.replace(/\\s/g, \"\")",
|
||
"targets": [],
|
||
"value": "telephone"
|
||
}, {
|
||
"id": "7ae25f21-35e0-4571-acc1-9760398ad7b1",
|
||
"comment": "",
|
||
"command": "assert",
|
||
"target": "tel",
|
||
"targets": [],
|
||
"value": "${telephone}"
|
||
}, {
|
||
"id": "5a5d5dce-a810-4fc1-9db4-85fcd91813a1",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre_info} == \"Oui\"",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "81972c44-2e82-440d-8e7f-084c448e65fe",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Non"
|
||
}, {
|
||
"id": "66ff407d-a3da-4bad-8955-08240359f993",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "036218b8-9bc8-4813-83f1-b86de7df4b42",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(text(), 'lettre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "Oui"
|
||
}, {
|
||
"id": "02616249-6e25-44b3-aff3-b66731fbe805",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e289adb3-b033-437a-b4d0-c04b4fe1cde4",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,\"Date d'inscription\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}]
|
||
}, {
|
||
"id": "1e8af828-327f-4540-99ee-9f9843826f29",
|
||
"name": "7-02 modifier mot de passe",
|
||
"commands": [{
|
||
"id": "ada19c6d-e29f-4af7-8d35-3308903dedd1",
|
||
"comment": "",
|
||
"command": "open",
|
||
"target": "http://test.paheko.localhost/admin/",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "46633303-64b7-4238-9ec5-8e5051508286",
|
||
"comment": "Vérifier si déjà connecté",
|
||
"command": "storeXpathCount",
|
||
"target": "xpath=//button[@name='login']",
|
||
"targets": [],
|
||
"value": "connecte"
|
||
}, {
|
||
"id": "cb248d6a-e6c1-4b7a-96c8-f257b8de4cee",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${connecte} > 0",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "52784bce-0325-4372-8ee8-2814e55efee8",
|
||
"comment": "identifiant",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "jckix@free.fr"
|
||
}, {
|
||
"id": "307dcc97-1d3e-4306-abe0-f8da12825726",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "interpeller noircir colis allumer"
|
||
}, {
|
||
"id": "e93f8fd8-c725-439d-8127-2f5d7d229d10",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d7d6c518-66f2-4d70-a1bf-6ff16218f026",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "1f3610fc-ac3e-43f4-bc58-e20fa2b65b21",
|
||
"comment": "",
|
||
"command": "setWindowSize",
|
||
"target": "1280x1020",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "bdd1f26a-9869-4bca-a021-b331536856fb",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "36bdb72f-d96f-45e4-9c2e-7b7b5ecfe0a4",
|
||
"comment": "rendre visibles les catégories",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "51acf95b-dd8e-4783-8dbd-bd835dac71af",
|
||
"comment": "Filtrer : Membres actifs",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Membres actifs\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "b4fda046-8d79-4f40-a982-f60034b559ce",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(., \"Membres actifs\")]//small",
|
||
"targets": [],
|
||
"value": "membres"
|
||
}, {
|
||
"id": "675ef859-70b5-4761-b99c-75572a80ac99",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Number(${membres}.split(/ /)[0])",
|
||
"targets": [],
|
||
"value": "nb_membres_actifs"
|
||
}, {
|
||
"id": "f36f8c2e-1abd-4add-a0b7-91040fa18a0c",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${nb_membres_actifs} < 2",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "30a9d8e5-bcfe-4217-a6a0-3572697d3456",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [
|
||
["linkText=Ajouter", "linkText"],
|
||
["css=li:nth-child(2) li:nth-child(1) > a", "css:finder"],
|
||
["xpath=//a[contains(text(),'Ajouter')]", "xpath:link"],
|
||
["xpath=//a[contains(@href, '/admin/users/new.php')]", "xpath:href"],
|
||
["xpath=//li/a", "xpath:position"],
|
||
["xpath=//a[contains(.,'Ajouter')]", "xpath:innerText"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "6ce4b455-495e-4840-b260-b3a9353f5e7e",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const upper = (str) => { return str.charAt(0).toUpperCase() + str.slice(1);} ; const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } let debut = upper(str.slice(0, length/2)); let fin = upper(str.slice(length/2)); return debut + ' ' + fin;};return chaine(12)",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "f3358402-24e8-4387-bcf3-fdff94adeff8",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_nom",
|
||
"targets": [
|
||
["id=f_nom", "id"],
|
||
["name=nom", "name"],
|
||
["css=#f_nom", "css:finder"],
|
||
["xpath=//input[@id='f_nom']", "xpath:attributes"],
|
||
["xpath=//dd[3]/input", "xpath:position"]
|
||
],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "3cae8a3e-d95a-4eba-9225-b21d92293753",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str; }; return chaine(8) + \"@\" + chaine(5) + \".fr\"",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "b975ab09-fb6b-41ab-bb17-e3c50152845d",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_email",
|
||
"targets": [
|
||
["id=f_email", "id"],
|
||
["name=email", "name"],
|
||
["css=#f_email", "css:finder"],
|
||
["xpath=//input[@id='f_email']", "xpath:attributes"],
|
||
["xpath=//dd[4]/input", "xpath:position"]
|
||
],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "34cbd6a4-8d53-4851-b95b-466af0d1910c",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "777 rue des arbousiers",
|
||
"targets": [],
|
||
"value": "adresse"
|
||
}, {
|
||
"id": "996412f8-8fba-4032-8598-fd68b7b6a415",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_adresse",
|
||
"targets": [
|
||
["id=f_adresse", "id"],
|
||
["name=adresse", "name"],
|
||
["css=#f_adresse", "css:finder"],
|
||
["xpath=//textarea[@id='f_adresse']", "xpath:attributes"],
|
||
["xpath=//textarea", "xpath:position"]
|
||
],
|
||
"value": "${adresse}"
|
||
}, {
|
||
"id": "3d477238-acc3-44ed-8fdb-bc9066967e94",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return Math.random().toString(10).substring(2, 7);",
|
||
"targets": [],
|
||
"value": "cp"
|
||
}, {
|
||
"id": "3887f140-9770-41a0-b9a1-583d6fb910a6",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_code_postal",
|
||
"targets": [
|
||
["id=f_code_postal", "id"],
|
||
["name=code_postal", "name"],
|
||
["css=#f_code_postal", "css:finder"],
|
||
["xpath=//input[@id='f_code_postal']", "xpath:attributes"],
|
||
["xpath=//dd[9]/input", "xpath:position"]
|
||
],
|
||
"value": "${cp}"
|
||
}, {
|
||
"id": "0c6224c1-ede8-4dd5-8073-b76d71560e7f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const chaine = (length) => { let chars = 'aàbcdeéèfghijklmnoôpqrstuùvwxyz'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); } return str.charAt(0).toUpperCase() + str.slice(1); }; return chaine(15)",
|
||
"targets": [],
|
||
"value": "ville"
|
||
}, {
|
||
"id": "8bd8127d-6f72-440d-97f6-111bcbe4324d",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_ville",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${ville}"
|
||
}, {
|
||
"id": "49b66444-6f77-4ef1-88f7-5fbc94c2c0df",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return '0' + Math.random().toString(10).substring(2, 11);",
|
||
"targets": [],
|
||
"value": "tel"
|
||
}, {
|
||
"id": "bbd79f50-b8c4-41db-b541-5648b5461ebc",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_telephone",
|
||
"targets": [
|
||
["id=f_ville", "id"],
|
||
["name=ville", "name"],
|
||
["css=#f_ville", "css:finder"],
|
||
["xpath=//input[@id='f_ville']", "xpath:attributes"],
|
||
["xpath=//dd[10]/input", "xpath:position"]
|
||
],
|
||
"value": "${tel}"
|
||
}, {
|
||
"id": "4bf3385d-1ddc-4eb8-be6f-0648ea68b9be",
|
||
"comment": "Inscription à la lettre d'information",
|
||
"command": "executeScript",
|
||
"target": "return Math.random() * 3 < 2",
|
||
"targets": [],
|
||
"value": "lettre"
|
||
}, {
|
||
"id": "7368bcb6-f0fb-4c01-adec-05116f19201f",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${lettre}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "9032cd8e-f130-41bf-9dca-0215123c3a8e",
|
||
"comment": "",
|
||
"command": "check",
|
||
"target": "id=f_lettre_infos_1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "e12e4d4f-7126-48a2-b1ac-c94bfe095eaf",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "743e9424-31e7-45a0-a62b-bfe9198d770e",
|
||
"comment": "",
|
||
"command": "store",
|
||
"target": "02/02/2022",
|
||
"targets": [],
|
||
"value": "date"
|
||
}, {
|
||
"id": "63f7e849-b32f-431e-84e6-e79ad2c11b2a",
|
||
"comment": "",
|
||
"command": "type",
|
||
"target": "id=f_date_inscription",
|
||
"targets": [],
|
||
"value": "${date}"
|
||
}, {
|
||
"id": "16397def-95bc-40fe-815e-7ee524e3f3ef",
|
||
"comment": "Enregistrer",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "cfd3341b-6083-4de2-9364-7d50138ab7cb",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "952de114-6e8d-42d2-8ee2-1b49d2cafb9d",
|
||
"comment": "Membres/Ajouter",
|
||
"command": "//click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users/new.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "95c01b0f-66c7-49db-870c-b7a0d2df947f",
|
||
"comment": "",
|
||
"command": "//storeValue",
|
||
"target": "id=f_numero",
|
||
"targets": [],
|
||
"value": "numero_dispo"
|
||
}, {
|
||
"id": "8b21b72c-22f7-4eef-845c-03a2791d87d8",
|
||
"comment": "chercher un membre à modifier",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "05347804-3a57-4d59-9dab-ee9bcab41f38",
|
||
"comment": "Menu Membres",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/users')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "3908d816-d769-4a8e-91bf-7c478df4a996",
|
||
"comment": "rendre visibles les catégories",
|
||
"command": "executeScript",
|
||
"target": "var nav = document.querySelector(\".dropdown\"); var li = nav.querySelectorAll(\"li\"); for (const l of li) { l.style.display=\"block\"; } return;",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "81b0457f-e6f0-4ece-b7b5-cbd122f43583",
|
||
"comment": "Filtrer : Membres actifs",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(., \"Membres actifs\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "03807a2d-3ed8-4858-b68f-c39aeb03773f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "3ed696ea-1844-447f-937a-5b233e3636c7",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 0",
|
||
"targets": [],
|
||
"value": "fini"
|
||
}, {
|
||
"id": "b36f27c7-287a-4950-9922-58d4063b8b19",
|
||
"comment": "",
|
||
"command": "while",
|
||
"target": "${num} <= ${nb_membres_actifs} && !${fini}",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "7a6c133c-06dd-4893-8672-afdcbc16003c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[@class=\"num\"]",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "8ee6b6ff-a4c1-4cf7-bb91-525cf0c48d6d",
|
||
"comment": "",
|
||
"command": "if",
|
||
"target": "${numero} != 1",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "ac5ff0c7-bf8b-42db-bbd1-c52db4dbad6f",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return 1",
|
||
"targets": [],
|
||
"value": "fini"
|
||
}, {
|
||
"id": "f9c32f69-1104-42df-8948-20dee98bca5f",
|
||
"comment": "",
|
||
"command": "else",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "0cec96de-59bb-4b5f-ab39-648fda741a5b",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "return ${num} + 1",
|
||
"targets": [],
|
||
"value": "num"
|
||
}, {
|
||
"id": "b5067d5d-9de0-44ff-b77d-8411c98b3371",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "a40f3494-fc46-49a0-ba0d-035664bc61fb",
|
||
"comment": "",
|
||
"command": "end",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "f56d4a9c-bff7-41e5-b411-9bb2fead8c32",
|
||
"comment": "fiche membre",
|
||
"command": "click",
|
||
"target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[@class=\"num\"]/a",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "54781af9-ae09-4738-89c8-caedb6ebc532",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,\"Catégorie\")]/following-sibling::dd[1]",
|
||
"targets": [],
|
||
"value": "categorie"
|
||
}, {
|
||
"id": "861cc567-4a86-45dd-90db-b9f3da90460c",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(text(), \"Inscription à la lettre d'information\")]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "lettre_info"
|
||
}, {
|
||
"id": "916da9a9-843d-4d14-b970-945d5bd96519",
|
||
"comment": "modifier le membre trouvé",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, 'edit_security.php')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "08d291d2-eb38-44a5-b266-a3bedaabf99a",
|
||
"comment": "",
|
||
"command": "executeScript",
|
||
"target": "const mdp = (length) => { let chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzàâäéèêëîïôöûüùÀÂÄÉÈÊËÎÏÔÖÛÜÙ&~\"#([-|`_@)]=°+€<>,?;.:/!§«»¿×÷¡'; let str = ''; for (let i = 0; i < length; i++) { str += chars.charAt(Math.floor(Math.random() * chars.length)); }; return str; }; return mdp(12)",
|
||
"targets": [],
|
||
"value": "mdp"
|
||
}, {
|
||
"id": "9492966a-4c3c-400f-b816-47d1f621cf50",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "index=0",
|
||
"targets": [
|
||
["index=0"]
|
||
],
|
||
"value": ""
|
||
}, {
|
||
"id": "36586775-d54b-4a84-9abc-f2922d7171dd",
|
||
"comment": "saisir mdp",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "${mdp}"
|
||
}, {
|
||
"id": "e4c0c278-f61a-41d0-8c59-02760d5530da",
|
||
"comment": "bis",
|
||
"command": "type",
|
||
"target": "id=f_password_confirmed",
|
||
"targets": [],
|
||
"value": "${mdp}"
|
||
}, {
|
||
"id": "3280537c-9880-47a1-bc5d-247d31c2f193",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "name=save",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "08b49d3b-3408-4b9e-9a79-18bb3a00e34f",
|
||
"comment": "",
|
||
"command": "selectFrame",
|
||
"target": "relative=parent",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "8bdb2659-4e8c-48a1-a2c2-f1c8fdf91131",
|
||
"comment": "Mémoriser quelques infos du membre",
|
||
"command": "",
|
||
"target": "",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "360bf3e9-c1ff-4790-9451-08e66496b24d",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "numero"
|
||
}, {
|
||
"id": "8fe0ffd3-6787-4267-bcde-7b287f6dede7",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "nom"
|
||
}, {
|
||
"id": "42a1e672-d30f-45e8-a462-18a6a9b2a6b3",
|
||
"comment": "",
|
||
"command": "storeText",
|
||
"target": "xpath=//a[contains(@href, 'mailto:')]",
|
||
"targets": [],
|
||
"value": "courriel"
|
||
}, {
|
||
"id": "616eec42-c1e8-488c-8077-b7421ab6ff98",
|
||
"comment": "déconnexion",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "d4c457b7-8525-424c-b94d-a7f70f79a33e",
|
||
"comment": "connexion du membre modifié",
|
||
"command": "type",
|
||
"target": "id=f_id",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "9e961c96-14e9-42bc-9749-04a982e9f724",
|
||
"comment": "mot de passe",
|
||
"command": "type",
|
||
"target": "id=f_password",
|
||
"targets": [],
|
||
"value": "${mdp}"
|
||
}, {
|
||
"id": "b3a464ef-1f7f-45c5-b847-43ac24c45334",
|
||
"comment": "Connexion",
|
||
"command": "click",
|
||
"target": "name=login",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "2fd66f55-71f7-47ae-8ef4-72f570472b42",
|
||
"comment": "Pas d'erreur ?",
|
||
"command": "assertElementNotPresent",
|
||
"target": "xpath=//div[contains(@class, \"error\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "78be4ca4-af37-4fab-a8fe-07a53f365622",
|
||
"comment": "",
|
||
"command": "assertElementPresent",
|
||
"target": "xpath=//h1[contains(text(), \"Bonjour ${nom}\")]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "128cd004-b308-4021-bd0d-033e07aeaeea",
|
||
"comment": "",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/me')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}, {
|
||
"id": "63c5642e-a78a-416f-bbe8-a465c76a3aca",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Numéro de membre')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${numero}"
|
||
}, {
|
||
"id": "73a91a69-9d23-4ed3-8c52-5a1a22af2aa3",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Nom & prénom')]/following-sibling::dd",
|
||
"targets": [],
|
||
"value": "${nom}"
|
||
}, {
|
||
"id": "728d9f9e-3926-4cc2-a08e-a3a58dea1fe7",
|
||
"comment": "",
|
||
"command": "assertText",
|
||
"target": "xpath=//dt[contains(.,'Adresse E-Mail')]/following-sibling::dd/a",
|
||
"targets": [],
|
||
"value": "${courriel}"
|
||
}, {
|
||
"id": "21085d8e-8fa9-4360-935f-642f7b23c5a2",
|
||
"comment": "déconnexion",
|
||
"command": "click",
|
||
"target": "xpath=//a[contains(@href, '/admin/logout')]",
|
||
"targets": [],
|
||
"value": ""
|
||
}]
|
||
}],
|
||
"suites": [{
|
||
"id": "6bdd4e16-7197-4388-9a5f-350523eb6c98",
|
||
"name": "1 Installation",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["b3fdeef5-2f6f-46e8-a9db-5995bbf94957", "b468a6eb-1199-460a-95f8-820df1f2c2f9", "d6791401-e683-4d44-9513-24c52f1c6517"]
|
||
}, {
|
||
"id": "d35b71cd-b332-4210-ad59-1a0742386aac",
|
||
"name": "2 Connexion",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["0849fbc2-a4f9-48a5-8698-afec02eb558f", "87aa0ef5-bb8c-496d-a196-0f92278e98b1", "c36d64ef-b5db-4c15-90aa-204431553d05"]
|
||
}, {
|
||
"id": "7fc1abfa-640b-438d-8357-d16f42212a22",
|
||
"name": "3 Créer membre",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["efad291c-7700-4c1d-a0c7-393264364aa1", "542187b1-45cd-4f09-bad6-b1220fbfc754", "efb8a434-ee82-48e0-a770-d4a668e28eec", "71fe09f0-51bb-4d2f-8c66-91ec5e235105", "895513b5-888a-4ea2-8036-5a97569cd6df", "20360774-e683-425b-a9b9-350dc0fb6ef3", "91ad3d23-dd66-4084-beeb-ea89ec4bfabc", "c05cb267-660d-46ab-8fe9-a7e042aa9c8f", "a6af2537-7860-43b2-92b6-1a93bb173a6c", "155a53f2-766f-4748-b11f-722b520df2eb", "4369d68b-3e2c-470e-b2b1-5a0825c35aa0", "077fea95-219b-4ab2-a10d-800ec7f39fb1"]
|
||
}, {
|
||
"id": "3b9945ba-2eb9-4f38-82ec-9a225b926d5c",
|
||
"name": "4 Lister membres",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["9d3d8f41-bff5-472e-ac87-6de5f10b4655", "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64", "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf", "2f1dd424-4188-4ff9-ba9b-63c1085b89d0", "8275ba53-edfc-40c6-ab55-2c9d9d76c10b", "1493219f-1880-4b77-8332-e780660d301e", "cbd065d0-2d2e-4433-b7b3-756af25bdbf5", "5a7f0fc2-fc66-46b2-a5f6-0d97c61d515a", "e6dc8eef-f38a-482b-8128-f46648bffe42", "3d1fc496-8036-4948-af1e-607d5375e813", "2d33e4b1-0a99-4c1f-a6b8-154362a00c66", "06e32c55-bd03-4164-8dc4-c3f36e39575d", "25e25640-41c1-4a8c-a8f3-288fed7fb46e"]
|
||
}, {
|
||
"id": "f7119734-cb63-4c70-b0d6-6c1ff8281761",
|
||
"name": "test",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": []
|
||
}, {
|
||
"id": "6b30df35-a48e-4c91-9fb6-6ae47eaa85be",
|
||
"name": "5 Recherches",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["e222e9ff-b40c-4b8b-a9b8-1adfc1e68184", "e0b8520c-d128-4cd9-b6fa-b351ea91d4d2", "cb3e76df-5def-477c-bad3-fbf27d8240f3", "7c55c402-5f6b-4b67-bbfe-b4d167ea2dda", "222c2c01-b33a-4c51-8f6e-103f9ac3504d", "748d040b-eed8-4d60-a769-a2e9f58ddd6b", "61d20306-ee4b-4221-a7b4-2c39558e4c74", "e47f2275-c9d9-4183-adf7-ca74b5b9cd75"]
|
||
}, {
|
||
"id": "0892a5e5-31d7-45f4-a947-48fce2559bbe",
|
||
"name": "6 Suppressions",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["13254e39-41ef-4909-ac46-f8ad0174d1b0", "e9ac5acc-6ff2-4523-807e-1316b020d8ca"]
|
||
}, {
|
||
"id": "04cff365-32de-4189-b4f6-b16bd9679421",
|
||
"name": "7 Modifications",
|
||
"persistSession": false,
|
||
"parallel": false,
|
||
"timeout": 300,
|
||
"tests": ["4c95e2ee-667c-4e1b-b55b-4cc92eda3c6f", "1e8af828-327f-4540-99ee-9f9843826f29"]
|
||
}],
|
||
"urls": ["http://test.paheko.localhost/"],
|
||
"plugins": []
|
||
} |