From 12515b4efa0d23a5ad7f069975a80ed7a075ad99 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Fri, 24 May 2024 11:00:36 +0200 Subject: [PATCH] 4-02 Harmonisation avec 4-01 et 4-03 --- paheko.side | 807 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 566 insertions(+), 241 deletions(-) diff --git a/paheko.side b/paheko.side index 106d4a5..bb42a75 100644 --- a/paheko.side +++ b/paheko.side @@ -6341,157 +6341,556 @@ "value": "" }] }, { - "id": "573e0c0d-763b-4403-9b0a-4685604cabdb", + "id": "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64", "name": "4-02 lister membres sauf catégories cachées", "commands": [{ - "id": "f8c892f4-a03f-421a-8d7c-d0f72cb6fe8d", + "id": "44094def-5892-4f3f-a645-1170d72de5b4", "comment": "", "command": "open", "target": "http://test.paheko.localhost/admin/", "targets": [], "value": "" }, { - "id": "c81732a2-bc59-43ac-b090-84225188c174", + "id": "0fb96b1f-04a5-4d84-8d42-8ad59a7d996f", "comment": "", "command": "setWindowSize", "target": "1080x1020", "targets": [], "value": "" }, { - "id": "eac4d374-91a2-48a3-803f-e05ddf28b349", + "id": "a508b0ea-759a-4c9f-a806-e5aff4164e23", "comment": "Vérifier si déjà connecté", "command": "storeXpathCount", "target": "xpath=//button[@name='login']", "targets": [], "value": "connecte" }, { - "id": "2f6ad60d-0fae-4e50-b9e5-705ef672328e", + "id": "e29fff9a-d6a2-404d-a2f7-e2fcb3b05bc4", "comment": "", "command": "if", "target": "${connecte} > 0", "targets": [], "value": "" }, { - "id": "1accd95b-b025-4b22-85f5-4ab61437360b", + "id": "3e2dd02a-1a68-4327-ae00-6ae88ccb86ed", "comment": "identifiant", "command": "type", "target": "id=f_id", "targets": [], "value": "jckix@free.fr" }, { - "id": "c0bdd339-0e81-4603-a20c-77c60c4f8eb3", + "id": "423ce3d8-c9e4-4ad2-abba-6c20a76659c1", "comment": "mot de passe", "command": "type", "target": "id=f_password", "targets": [], "value": "interpeller noircir colis allumer" }, { - "id": "90558872-d926-4dd8-a91b-8a7016a4d721", + "id": "777b3fbc-4d2a-4823-b41f-cd3e56a88849", "comment": "Connexion", "command": "click", "target": "name=login", "targets": [], "value": "" }, { - "id": "4e156bda-b170-427e-9071-8a2e05317235", + "id": "b36a32c3-ece0-4338-a300-895c14d4d965", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "07e01da2-e319-4396-9724-5fd5e25ba649", - "comment": "Menu Membres", - "command": "click", - "target": "xpath=//a[contains(@href, '/admin/users')]", + "id": "226e9450-ebba-4f29-8237-5a0999b7d819", + "comment": "Récupérer la liste des catégories", + "command": "", + "target": "", "targets": [], "value": "" }, { - "id": "7d2fe52d-b343-4593-9c6e-204adf81e1eb", - "comment": "", - "command": "storeXpathCount", - "target": "xpath=//nav[@class=\"dropdown\"]//a[contains(@href, \"?cat=\")]", - "targets": [], - "value": "nb_categories" - }, { - "id": "9889bf00-e512-4a3e-9c95-214852edf0c9", - "comment": "Nombre catégories", - "command": "executeScript", - "target": "return ${nb_categories} - 2", - "targets": [], - "value": "nb_categories" - }, { - "id": "d9350003-939f-48a9-8aa0-5572c41db257", - "comment": "", - "command": "echo", - "target": "nb catégories = ${nb_categories}", - "targets": [], - "value": "" - }, { - "id": "99d93dd7-dd3f-4e29-9377-c9726f4e52b3", + "id": "7143ddd7-d2d0-4aef-8626-fcbc1b2e4002", "comment": "", "command": "click", "target": "xpath=//a[contains(@href, '/admin/users/new.php')]", - "targets": [], + "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": "e32eeacb-1e33-408c-92a2-0facf4d7c08f", - "comment": "Mémoriser premier numéro disponible", - "command": "storeValue", - "target": "id=f_numero", - "targets": [], - "value": "premier_numero" - }, { - "id": "c1569bd9-e711-49e9-9ec5-895b02e3e1e8", + "id": "dbad02d1-8460-4433-82de-90c40bf622b9", "comment": "", "command": "executeScript", - "target": "return Number(${premier_numero})", - "targets": [], - "value": "premierNumero" - }, { - "id": "77358384-2699-40db-a524-761542888efd", - "comment": "", - "command": "echo", - "target": "Premier numéro = ${premierNumero}", - "targets": [], - "value": "" - }, { - "id": "fbff2b7e-b0b9-4cbb-ab21-5cb152b33927", - "comment": "Init liste noms", - "command": "executeScript", "target": "return []", "targets": [], - "value": "lesnoms" + "value": "categories_alpha" }, { - "id": "eb199834-6755-40a0-b56e-f9bb77197e49", - "comment": "Remplir liste des noms", + "id": "05d8419c-7c86-4f67-9731-d6f298468a96", + "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; }; for (let i = 0; i < 7 + Math.floor(Math.random() * 15); ++i) { ${lesnoms} = ${lesnoms}.concat(chaine(12)); } return ${lesnoms};", + "target": "return []", "targets": [], - "value": "lesnoms" + "value": "numeros_alpha" }, { - "id": "5d1658e6-c7e4-46ae-8b2d-534edae0f143", + "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": "ff06723a-4e7a-40b7-9266-3354e358cf6f", + "comment": "", + "command": "echo", + "target": "${num_cat} : ${cat}", + "targets": [], + "value": "" + }, { + "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": "df80777b-02ae-4f4b-8df5-c42240e70f9e", + "comment": "", + "command": "echo", + "target": "${i} : ${categorie}", + "targets": [], + "value": "" + }, { + "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": "67b0f005-658e-419c-83ad-5f597af23883", + "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": "63d42c55-4d4d-46a4-b259-8078238c7e85", - "comment": "Parcourir liste noms pour ajout dans la base", - "command": "forEach", - "target": "lesnoms", + "id": "921fa05f-324c-4b64-93a7-99f38653c8be", + "comment": "Menu Membres", + "command": "click", + "target": "xpath=//a[contains(@href, '/admin/users')]", "targets": [], - "value": "nom" + "value": "" }, { - "id": "b14e10fc-505c-4a5c-bedd-e5a312c4a518", + "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 affiché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": "d99af581-f989-48a6-a186-1be1ffd27e4d", + "comment": "", + "command": "echo", + "target": "${numeroAffiche} : ${nomAffiche} - ${categorie} - ${num_cat}", + "targets": [], + "value": "" + }, { + "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": "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(12)); } return ${lesnoms};", + "targets": [], + "value": "lesnoms" + }, { + "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": "45e4e37a-fdcf-4176-a987-bf3aee9a3dbb", + "comment": "", + "command": "echo", + "target": "i=${i}, nb_total_membres=${nb_total_membres}, nb_noms=${nb_noms}", + "targets": [], + "value": "" + }, { + "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')]", @@ -6505,42 +6904,49 @@ ], "value": "" }, { - "id": "173afb60-8aa7-4bf7-a980-66e619be3909", + "id": "3aba2105-2f80-40b7-a087-b09792cbd359", "comment": "Mémoriser numéro de membre", "command": "storeValue", "target": "id=f_numero", "targets": [], "value": "numero" }, { - "id": "5898991c-0294-49dc-a0a5-81c8f2d031e1", + "id": "0eba07c9-5569-429d-9b4d-4e17412871ce", "comment": "Ajouter numéro à la liste", "command": "executeScript", "target": "return ${lesnumeros}.concat(${numero})", "targets": [], "value": "lesnumeros" }, { - "id": "f3c177b0-574b-4750-bb5a-daf962fdcb0c", + "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": "88518dc9-2d13-4f20-b4fd-9557440ab27a", - "comment": "Ajouter catégorie à la liste", + "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": "de72edb6-a3ad-4c91-9421-227606a91b25", + "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": "69459edb-c2dd-4a1c-95a9-bea14d57688c", + "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", @@ -6553,101 +6959,34 @@ ], "value": "${nom}" }, { - "id": "d660aa7e-8c57-4fe4-81f1-43154ad15c89", - "comment": "Afficher nom catégorie", + "id": "248c7a3b-af8c-4430-b3dd-c08774c7fc02", + "comment": "", "command": "echo", "target": "Ajout de ${nom}, catégorie = ${num_cat}", "targets": [], "value": "" }, { - "id": "01144e2b-84e0-401f-8328-c71d60fadd6b", - "comment": "Générer courriel", + "id": "fd59fdfa-40e1-40d5-b487-8311c41fdc86", + "comment": "Générer ville", "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) + \"@ici.fr\"", + "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": "courriel" + "value": "ville" }, { - "id": "90553611-9472-4f7a-bf82-441527af8aee", - "comment": "Saisir courriel", + "id": "79918399-a69e-4815-a44c-daa9533ac10c", + "comment": "Saisir ville", "command": "type", - "target": "id=f_email", + "target": "id=f_ville", "targets": [ - ["id=f_email", "id"], - ["name=email", "name"], - ["css=#f_email", "css:finder"], - ["xpath=//input[@id='f_email']", "xpath:attributes"], + ["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": "${courriel}" + "value": "${ville}" }, { - "id": "d98fa1ef-445e-4aea-8eda-263440a9b14e", - "comment": "Générer code postal", - "command": "executeScript", - "target": "return Math.random().toString(10).substring(2, 7);", - "targets": [], - "value": "cp" - }, { - "id": "9cabebb6-9ede-48c1-a9bf-3b77ee24695e", - "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": "338c874a-a971-445c-81dc-b12e0b5dde7b", - "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": "f9056eaf-1c12-4949-be6c-1429a9f98487", - "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": "baa88081-1c2e-4c6f-9539-c5f573e01e21", - "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": "a0c78134-eb31-42ad-9705-fd965efa8a3c", - "comment": "essayer de rendre visible le bouton Enregistrer", - "command": "sendKeys", - "target": "id=f_date_inscription", - "targets": [], - "value": "${KEY_TAB}" - }, { - "id": "e3c969ba-7ed9-4db4-bd1a-f53078d989be", - "comment": "essayer de rendre visible le bouton Enregistrer", - "command": "sendKeys", - "target": "xpath=//span[@class=\"datepicker-parent\"]//button", - "targets": [], - "value": "${KEY_TAB}" - }, { - "id": "735fa121-9fad-42c4-86c3-b9601d7c9bf3", + "id": "b8312fab-db26-4c94-bf73-a92975a2df9d", "comment": "Enregistrer les infos", "command": "click", "target": "name=save", @@ -6660,336 +6999,322 @@ ], "value": "" }, { - "id": "e25bc90a-b87b-44ac-b304-9f48520587c0", + "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": "99a50015-e8fe-4d06-bbd6-8d0392c2bfd6", + "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": "75515b67-31ff-40f6-9256-abe2a2c44cc9", + "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": "1ac54b08-91ea-413c-8a05-6fd8d8d3d3e2", + "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": "be7e6b2c-2f8a-430f-ae31-3eef54680d86", + "id": "4d07de3a-06d5-40ef-ba31-9053846c1fe1", "comment": "idem", "command": "executeScript", "target": "return Number(${membres}.split(/ /)[0])", "targets": [], - "value": "nb_total_membres" + "value": "nb_membres_cat" }, { - "id": "28b4800c-582d-434d-812d-23cb396b7686", + "id": "56ab778a-c590-4196-8168-533eaa8ab61e", "comment": "", "command": "echo", - "target": "nombre de membres dans la catégorie = ${nb_total_membres}", + "target": "nombre de membres non cachés = ${nb_membres_cat}", "targets": [], "value": "" }, { - "id": "3e3d1f19-4588-4ce6-ada4-035a190c9d17", + "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": "f53da4f4-a4ff-4f94-958f-4a49f53ada36", + "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": "9c474566-3ab3-4788-adec-76ce7dd8f898", + "id": "c8368860-7f40-48b4-aec8-9543f9ffeecd", "comment": "inverser le tri s'il est en ordre décroissant", "command": "", "target": "", "targets": [], "value": "" }, { - "id": "7458c9f0-91dc-4529-ac63-49bc56a9b780", + "id": "e17bc397-b18c-42d7-8146-4acd2351a3f6", "comment": "au moins 2 membres dans la catégorie", "command": "if", - "target": "${nb_total_membres} >= 2", + "target": "${nb_membres_cat} >= 2", "targets": [], "value": "" }, { - "id": "e740fbec-f86b-48f9-871b-357a3e6b0165", + "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": "d2ff2ac7-ca21-4f65-b6ba-4585bc7e546b", + "id": "60e9ac85-6fa3-4c79-8202-4f3731f25b48", "comment": "", "command": "executeScript", "target": "return Number(${numaff1})", "targets": [], "value": "numero1" }, { - "id": "fb6e3de6-8caa-4821-a63e-229f4624e5da", + "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": "aa8c59ed-4d95-4846-b042-7d80123eea6e", + "id": "427d7499-800f-48c5-9ccc-42978c99d3b1", "comment": "", "command": "executeScript", "target": "return Number(${numaff2})", "targets": [], "value": "numero2" }, { - "id": "94d4ae80-4c51-4270-b293-cb9116f6ba70", + "id": "8902ea3d-d6bd-4290-98c5-9bac2d0f3449", "comment": "", "command": "if", "target": "${numero1} > ${numero2}", "targets": [], "value": "" }, { - "id": "75ccb4ca-6cc4-4692-9786-61b7297b2339", + "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": "daa735c1-60b9-4456-b1e6-074dc4b460ee", + "id": "3a95b6da-d2a0-40fa-9b78-e1c3a6b88328", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "4d59e290-7c24-4476-a835-8636a323bdd2", + "id": "4a0770b1-3a7c-41f0-ac7e-a080d846c12b", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "86669cc3-c2db-4ea3-809f-8ea742a784ea", + "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": "1ee745c6-ce73-4337-b8a5-161c260ef864", + "id": "779f1ee1-cf59-40c2-818b-f971069bd983", "comment": "", "command": "echo", "target": "nombre de membres sur la page = ${nb_membres_page}", "targets": [], "value": "" }, { - "id": "c8a1e837-f163-4b6b-94a4-2944a03924d7", + "id": "9c99a149-7ce1-45de-a63e-e6d235d81078", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "e866d071-544e-4486-8249-cad011bcfd34", + "id": "1baf6e10-120c-43ec-a572-1ff5140871fc", "comment": "", "command": "executeScript", "target": "return 0", "targets": [], "value": "i" }, { - "id": "8a3d42c9-4c65-4865-8550-a8908f540418", + "id": "8fdd620d-447b-4122-be2a-3a908d4855e8", "comment": "Parcourir les membres affichés", "command": "while", - "target": "${num} <= ${nb_total_membres}", + "target": "${num} <= ${nb_membres_cat}", "targets": [], "value": "" }, { - "id": "fbfb1c86-d269-467a-ad24-69599e652464", + "id": "fee67cf0-f500-4c82-b724-e7a8739674c8", "comment": "fin de page ?", "command": "if", "target": "${num} > ${nb_membres_page}", "targets": [], "value": "" }, { - "id": "52330878-a1f9-4a52-8038-34fd282b4c29", + "id": "625eb23c-a659-4f9a-8f1a-88e33f123834", "comment": "passer à la page suivante", "command": "click", "target": "xpath=//li[@class=\"next\"]//a", "targets": [], "value": "" }, { - "id": "6138bd34-e8b2-4513-8ffe-57f6b0f72aba", + "id": "dbf0ae36-18b8-48ea-a665-27a138ae8a11", "comment": "", "command": "executeScript", - "target": "return ${nb_total_membres} - ${nb_membres_page}", + "target": "return ${nb_membres_cat} - ${nb_membres_page}", "targets": [], - "value": "nb_total_membres" + "value": "nb_membres_cat" }, { - "id": "5eb9c15f-0b7e-4e60-ac45-7ba260673de7", + "id": "178ac47f-e78b-41a0-a1c2-2f46307f3c9d", "comment": "", "command": "executeScript", "target": "return 1", "targets": [], "value": "num" }, { - "id": "02ae1159-56ec-487e-87c4-5167b0948911", - "comment": "Nombre de membres sur la page", + "id": "bdda7799-804f-4755-b4ea-3fe26a983750", + "comment": "", "command": "storeXpathCount", "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" }, { - "id": "d68aba7d-9b37-477b-8dd7-b886759ba60f", + "id": "5111d81d-063e-414c-97ca-3334f6420fac", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "67648e53-49cb-4191-b44e-3ec5425bd194", + "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": "945cda0b-0ea7-4c64-a706-9c4e541176f3", + "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": "49904774-b9b9-486c-a77e-fe464c9380cb", + "id": "58019ba1-317d-459c-b6be-6940ee58c43c", "comment": "numéro mémorisé", "command": "executeScript", "target": "return ${lesnumeros}.at(${i})", "targets": [], "value": "numero" }, { - "id": "8413395b-f90a-4260-89b7-3936845fd7c4", + "id": "a2c25509-995c-4694-8f38-07f7eb46dc11", "comment": "nom mémorisé", "command": "executeScript", "target": "return ${lesnoms}.at(${i})", "targets": [], "value": "nom" }, { - "id": "900ecf1f-95d7-4211-9a0b-ee4821566d1a", - "comment": "Catégorie du membre", + "id": "e1dfa8bf-f6d2-44ef-86d3-6459b3a8c434", + "comment": "catégorie mémorisée", "command": "executeScript", "target": "return ${lescategories}.at(${i})", "targets": [], "value": "categorie" }, { - "id": "c1cacb08-1d84-4344-a772-f75cfb12b21e", + "id": "c519db38-1a13-4778-b8ab-886a0735a6b1", "comment": "", "command": "echo", "target": "n=${num} ${numeroAffiche} ${nomAffiche}", "targets": [], "value": "" }, { - "id": "d3504d02-7f61-4e3d-b182-2aae0ea628ea", + "id": "666e71ac-3851-42d2-b266-4a8d1a6e25c0", "comment": "", "command": "echo", "target": "i=${i} ${numero} ${nom} cat=${categorie}", "targets": [], "value": "" }, { - "id": "1b169576-548a-4f8d-ad64-0873b2579aea", + "id": "7b8dcbb8-6572-4f62-ba4f-95fff0fadad9", "comment": "", "command": "executeScript", "target": "return Number(${numeroAffiche})", "targets": [], "value": "numaff" }, { - "id": "e40924bc-4efa-4256-972f-98ce9e52faa6", - "comment": "Si c'est un des noms générés", - "command": "if", - "target": "${numaff} >= ${premierNumero}", - "targets": [], - "value": "" - }, { - "id": "44303520-e7d4-459d-bd61-163e7de8801a", + "id": "40ec0b9a-9cf2-4d44-bdc3-31334001f309", "comment": "Catégorie non cachée ?", "command": "if", "target": "${categorie} != 2", "targets": [], "value": "" }, { - "id": "1162c5b9-00bf-4dbc-baaa-6bbd8362cd89", + "id": "9203bc8a-d5fc-4a31-9e00-420cb71a8ac5", "comment": "", "command": "assert", "target": "numeroAffiche", "targets": [], "value": "${numero}" }, { - "id": "54eef252-fc7e-46f3-9d83-1573dde4c16a", + "id": "6788d22a-aad1-40da-b1fb-29aeddda7f16", "comment": "", "command": "assert", "target": "nomAffiche", "targets": [], "value": "${nom}" }, { - "id": "2eee5cd9-1219-4d3a-9c47-6a6a647e61a6", + "id": "4fab279e-5973-4e6a-91fb-d39407661b32", "comment": "", "command": "executeScript", "target": "return ${num} + 1", "targets": [], "value": "num" }, { - "id": "34e519d0-02e8-4770-b792-f9e04e74a56f", + "id": "ad985ad0-5709-4a25-a31e-557f0c6513ad", "comment": "", "command": "end", "target": "", "targets": [], "value": "" }, { - "id": "dc14b87b-4519-45eb-afc8-7e75e9175ef5", + "id": "a252f259-7a82-4e86-9af9-3622a048850e", "comment": "", "command": "executeScript", "target": "return ${i} +1", "targets": [], "value": "i" }, { - "id": "362f3910-6e80-4f76-9431-21cd2a5c9c0c", - "comment": "", - "command": "else", - "target": "", - "targets": [], - "value": "" - }, { - "id": "e7bb2415-93a8-45c9-bdb4-7aff2f079968", - "comment": "", - "command": "executeScript", - "target": "return ${num} + 1", - "targets": [], - "value": "num" - }, { - "id": "e7af04b9-0d02-4ad6-8c06-8f708fc292b8", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "361657f6-d4fa-47a0-99ff-7a7ab8f19e95", + "id": "4ef9d97b-6b5d-40f2-98c7-5bf3737fcc87", "comment": "", "command": "end", "target": "", @@ -9618,7 +9943,7 @@ "persistSession": false, "parallel": false, "timeout": 300, - "tests": ["480c3e63-6791-490d-8867-b46ba24a0751", "573e0c0d-763b-4403-9b0a-4685604cabdb", "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf"] + "tests": ["480c3e63-6791-490d-8867-b46ba24a0751", "eba6c550-37b2-4e7e-9352-d50cd1aeb2bf", "9d3d8f41-bff5-472e-ac87-6de5f10b4655", "91ef7a3d-27a5-4d1a-bb91-5ffdb927bb64"] }, { "id": "f7119734-cb63-4c70-b0d6-6c1ff8281761", "name": "test",