diff --git a/paheko.side b/paheko.side index 216247e..210b8cc 100644 --- a/paheko.side +++ b/paheko.side @@ -12601,7 +12601,7 @@ "command": "storeXpathCount", "target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]", "targets": [], - "value": "titre_rattache" + "value": "existe_rattache" }, { "id": "72313121-a659-407d-b9ef-269161698e24", "comment": "", @@ -12616,13 +12616,6 @@ "target": "xpath=//table[@class=\"list\"]/tbody/tr/th//span", "targets": [], "value": "nb_membres_page" - }, { - "id": "66440cbf-d1b7-4622-b656-44a45f90efbb", - "comment": "", - "command": "echo", - "target": "total = ${nb_total_membres}, page= ${nb_membres_page}", - "targets": [], - "value": "" }, { "id": "07cf520c-6978-4759-a1d7-6ecd2d787e4b", "comment": "", @@ -12718,7 +12711,7 @@ "id": "0b2b0cf6-2d83-42d2-8f6f-1f78170bacb6", "comment": "", "command": "if", - "target": "${titre_rattache} > 0", + "target": "${existe_rattache} > 0", "targets": [], "value": "" }, { @@ -12728,13 +12721,6 @@ "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]", "targets": [], "value": "parentAffiche" - }, { - "id": "12d9774a-4049-447d-9b13-8c827146ab63", - "comment": "", - "command": "//echo", - "target": "${numeroAffiche} : ${nomAffiche}, «${parentAffiche}»", - "targets": [], - "value": "" }, { "id": "a48c363a-74f5-4f4f-93a8-ee50153e39f1", "comment": "", @@ -12805,76 +12791,6 @@ "target": "", "targets": [], "value": "" - }, { - "id": "3ad96c69-aeba-4b42-be8f-25beed39512f", - "comment": "Afficher les données mémorisées", - "command": "//echo", - "target": "Afficher les données mémorisées", - "targets": [], - "value": "" - }, { - "id": "553c925d-049c-4b70-baa0-17356f5e96b7", - "comment": "", - "command": "echo", - "target": "total = ${nb_total_membres}, parents = ${nb_parents}", - "targets": [], - "value": "" - }, { - "id": "7f5f6279-f05b-4766-a95b-05915f2c243c", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "i" - }, { - "id": "145fbc3e-df45-4e2e-bae6-955649607292", - "comment": "", - "command": "//while", - "target": "${i} < ${nb_total_membres}", - "targets": [], - "value": "" - }, { - "id": "a9474bfd-aab6-49ef-9dbd-029cc53cc2b4", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnumeros}.at(${i}) ", - "targets": [], - "value": "num" - }, { - "id": "446d6c32-6e66-487a-a916-94889bbc1b39", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnoms}.at(${i})", - "targets": [], - "value": "nom" - }, { - "id": "93eeed1d-3bd2-4985-863e-fc553ba5de37", - "comment": "", - "command": "//executeScript", - "target": "return ${lesparents}.at(${i})", - "targets": [], - "value": "parent" - }, { - "id": "0cf57c19-5ef8-4ef7-88c8-2b5db94e10b0", - "comment": "", - "command": "//echo", - "target": "${num} : ${nom}, «${parent}»", - "targets": [], - "value": "" - }, { - "id": "be314142-3b5d-4ca8-9710-24c4684899d4", - "comment": "", - "command": "//executeScript", - "target": "return ${i} + 1", - "targets": [], - "value": "i" - }, { - "id": "9df4f8c3-8b26-4743-8cd9-d18ac037400b", - "comment": "", - "command": "//end", - "target": "", - "targets": [], - "value": "" }, { "id": "a6d6d344-f6ed-41fa-a2aa-f8a25ad5cfa7", "comment": "Générer de nouveaux membres si nécessaire", @@ -12972,13 +12888,6 @@ ["xpath=//dd[3]/input", "xpath:position"] ], "value": "${nom}" - }, { - "id": "1da9426a-2281-4787-a61b-4b9752dfd57d", - "comment": "", - "command": "//echo", - "target": "Ajout de ${nom}", - "targets": [], - "value": "" }, { "id": "429e6281-b176-42ae-9899-76eec2b44936", "comment": "sélectionner un parent parmi les membres présents", @@ -12986,13 +12895,6 @@ "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": "2c6d73d0-fe64-4a82-9a14-d50c3daa933c", - "comment": "", - "command": "//echo", - "target": "parent = ${parent}", - "targets": [], - "value": "" }, { "id": "9e65cb94-4898-4564-a671-7097619e2504", "comment": "Ajouter parent à la liste", @@ -13139,69 +13041,6 @@ "target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.parent); }); return resu;} return extraire(${membres_parent_asc})", "targets": [], "value": "lesparents_asc" - }, { - "id": "9da881aa-2177-44bc-ab5f-f89b53ca31e5", - "comment": "Afficher les infos triées par parent croissant", - "command": "//echo", - "target": "Afficher les infos triées par parent croissant", - "targets": [], - "value": "" - }, { - "id": "72c255da-0e11-4604-96f8-425079e7bc61", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "i" - }, { - "id": "fa0cf471-e20c-4572-8963-9fed96bac06f", - "comment": "", - "command": "//while", - "target": "${i} < ${lesnumeros_parent_asc}.length", - "targets": [], - "value": "" - }, { - "id": "eec088e5-f1dd-4eab-b062-6ea4ec582099", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnumeros_parent_asc}.at(${i})", - "targets": [], - "value": "num" - }, { - "id": "4eda4c63-bd3f-4fae-a474-6fe92ccb3eb7", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnoms_parent_asc}.at(${i})", - "targets": [], - "value": "nom" - }, { - "id": "b6b08f51-57ab-40ab-9758-f104a8481754", - "comment": "", - "command": "//executeScript", - "target": "return ${lesparents_asc}.at(${i})", - "targets": [], - "value": "parent" - }, { - "id": "0a842c8d-df0b-4f70-97d2-4690b2384f56", - "comment": "", - "command": "//echo", - "target": "${num} : ${nom}, ${parent}", - "targets": [], - "value": "" - }, { - "id": "07951d01-ae4c-4e11-b192-5968fa2ae5e6", - "comment": "", - "command": "//executeScript", - "target": "return ${i} + 1", - "targets": [], - "value": "i" - }, { - "id": "d7d8e83e-9b16-4562-8546-c44a7afb3de7", - "comment": "", - "command": "//end", - "target": "", - "targets": [], - "value": "" }, { "id": "aee6536a-c9e3-4fa7-ad95-7fedcfb28b8d", "comment": "Vérifier les membres", @@ -13236,14 +13075,14 @@ "command": "executeScript", "target": "return Number(${membres}.split(/ /)[0])", "targets": [], - "value": "nb_membres_cat" + "value": "nb_total_membres" }, { "id": "a31f76d4-26bb-4d25-afa6-ff804e795f44", "comment": "", "command": "assert", "target": "nb_noms", "targets": [], - "value": "${nb_membres_cat}" + "value": "${nb_total_membres}" }, { "id": "caf359c0-4e02-466e-8b8f-beca805d69cd", "comment": "Filtrer : toutes catégories même cachées", @@ -13276,86 +13115,128 @@ "id": "d2b1eec6-f76e-411d-bf2a-245499ff8589", "comment": "", "command": "if", - "target": "${nb_membres_cat} >= 2", + "target": "${nb_total_membres} >= 2", "targets": [], "value": "" }, { "id": "5f7d406c-27f5-4f76-a8d9-b4097b59d572", "comment": "", - "command": "executeScript", - "target": "return 1", - "targets": [], - "value": "num" - }, { - "id": "c13e7906-58c6-4732-90c8-06481b2367c7", - "comment": "chercher le premier parent non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "74c3fcb9-640a-41da-b666-f2b3a7898dce", - "comment": "", - "command": "while", - "target": "${num} <= ${nb_membres_page}", + "command": "if", + "target": "${nb_parents} >= 2", "targets": [], "value": "" }, { "id": "c725c982-1e45-4768-8b0b-04ef0dc4a525", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[4]", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//td[4]", "targets": [], - "value": "premier_parent" + "value": "parent1" }, { - "id": "68ef9b49-6413-4da8-9532-d92cb8e7d32e", + "id": "f8991fa9-f588-4a37-bd5c-a3ad1e1b757c", "comment": "", - "command": "if", - "target": "${premier_parent} != \"\"", + "command": "storeText", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//td[4]", "targets": [], - "value": "" + "value": "parent2" }, { "id": "9473ae96-2a7f-4555-aa81-5627b4d821d4", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//th//span", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span", "targets": [], - "value": "nom_premier" + "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[${num}]/td[@class=\"num\"]//span", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]/td[@class=\"num\"]//span", "targets": [], "value": "numero1" }, { - "id": "b9a4b1c3-55c6-45ca-8cc6-9addc0e5c52b", + "id": "1b8c7bd8-5e60-48cc-b4d6-ad69d7007d3b", "comment": "", - "command": "executeScript", - "target": "return Number(${numero1})", + "command": "storeText", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[2]/td[@class=\"num\"]//span", "targets": [], - "value": "numero_premier" + "value": "numero2" }, { - "id": "7887e3f2-b52e-4c0a-b793-246e9b15a00b", - "comment": "trouvé", - "command": "executeScript", - "target": "return ${nb_membres_page} + 1", - "targets": [], - "value": "num" - }, { - "id": "6a89d834-0105-400a-a7f7-1038a20032b4", + "id": "c13e7906-58c6-4732-90c8-06481b2367c7", "comment": "", - "command": "else", + "command": "if", + "target": "${parent1}.localeCompare(${parent2}) > 0 || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) > 0) || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) == 0 && Number(${numero2}) > 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": "af69b0c0-e86b-4ea4-a207-de6d79f016e8", + "id": "74c3fcb9-640a-41da-b666-f2b3a7898dce", "comment": "", - "command": "executeScript", - "target": "return ${num} + 1", + "command": "elseIf", + "target": "${nb_parents} < 2 && ${nb_total_membres} > 2", "targets": [], - "value": "num" + "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": "", @@ -13370,132 +13251,6 @@ "target": "", "targets": [], "value": "" - }, { - "id": "25756246-5b9b-4c6d-a316-ace260739d97", - "comment": "", - "command": "echo", - "target": "premier = ${numero_premier}, ${nom_premier}, ${premier_parent}", - "targets": [], - "value": "" - }, { - "id": "5cbfd014-a78c-4107-a5e2-cb344a758db7", - "comment": "chercher le dernier parent non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "0c4365ae-5356-44dc-b14d-299c6808b12b", - "comment": "", - "command": "executeScript", - "target": "return ${nb_membres_page}", - "targets": [], - "value": "num" - }, { - "id": "254b76f8-66a3-4bee-ba1d-cdb0c753bc2e", - "comment": "", - "command": "while", - "target": "${num} > 0", - "targets": [], - "value": "" - }, { - "id": "f8991fa9-f588-4a37-bd5c-a3ad1e1b757c", - "comment": "", - "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[4]", - "targets": [], - "value": "dernier_parent" - }, { - "id": "d769de03-c678-4f0a-a261-c1ad7009c890", - "comment": "", - "command": "if", - "target": "${dernier_parent} != \"\"", - "targets": [], - "value": "" - }, { - "id": "20a8bada-4099-4f0b-bba8-59bf4f3337b6", - "comment": "", - "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::th", - "targets": [], - "value": "nom_dernier" - }, { - "id": "1b8c7bd8-5e60-48cc-b4d6-ad69d7007d3b", - "comment": "", - "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span", - "targets": [], - "value": "numero2" - }, { - "id": "eeff9c30-04a0-4b82-824b-2f63cdaec0f6", - "comment": "", - "command": "executeScript", - "target": "return Number(${numero2})", - "targets": [], - "value": "numero_dernier" - }, { - "id": "951a994e-9aaa-4805-9044-15083e1500b6", - "comment": "trouvé", - "command": "executeScript", - "target": "return 0", - "targets": [], - "value": "num" - }, { - "id": "0909285e-830e-4ad3-9862-3c68e7998e6d", - "comment": "", - "command": "else", - "target": "", - "targets": [], - "value": "" - }, { - "id": "cfd4f982-b357-4c87-9d35-807920541a31", - "comment": "", - "command": "executeScript", - "target": "return ${num} - 1", - "targets": [], - "value": "num" - }, { - "id": "182b975a-436c-4ead-a947-71a1bbdb0e6c", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "8772ca61-b0d0-427c-afea-95c1fe6010a9", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "7b0d6174-0b76-4e7b-b6bd-ad1293a01724", - "comment": "", - "command": "echo", - "target": "dernier = ${numero_dernier}, ${nom_dernier}, ${dernier_parent}", - "targets": [], - "value": "" - }, { - "id": "48dc8b1b-dd82-46e0-97ef-831866c8ddcb", - "comment": "", - "command": "if", - "target": "${premier_parent}.localeCompare(${dernier_parent}) > 0 || (${premier_parent}.localeCompare(${dernier_parent}) == 0 && ${nom_premier}.localeCompare(${nom_dernier}) > 0) || (${premier_parent}.localeCompare(${dernier_parent}) == 0 && ${nom_premier}.localeCompare(${nom_dernier}) == 0 && ${numero_premier} > ${numero_dernier})", - "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": "ead6c976-42bd-4fa3-83b3-372a4206aeb4", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" }, { "id": "fa0d4446-b42a-42fc-b882-cf8e8db8e0bf", "comment": "", @@ -13503,13 +13258,6 @@ "target": "", "targets": [], "value": "" - }, { - "id": "773cf9f8-512c-4d33-9622-504cc3b08b0b", - "comment": "", - "command": "//echo", - "target": "nombre de membres sur la page = ${nb_membres_page}", - "targets": [], - "value": "" }, { "id": "05d8e8cf-6b12-42f2-856c-79a1d8e13ca5", "comment": "", @@ -13528,7 +13276,7 @@ "id": "fb41d71f-ca39-4882-98eb-a5b9c061af90", "comment": "Parcourir les membres enregistrés", "command": "while", - "target": "${num} <= ${nb_membres_cat}", + "target": "${num} <= ${nb_total_membres}", "targets": [], "value": "" }, { @@ -13549,9 +13297,9 @@ "id": "6e78ed74-be18-48f1-8b65-19d439d82704", "comment": "", "command": "executeScript", - "target": "return ${nb_membres_cat} - ${nb_membres_page}", + "target": "return ${nb_total_membres} - ${nb_membres_page}", "targets": [], - "value": "nb_membres_cat" + "value": "nb_total_membres" }, { "id": "1fc92746-07b5-4fec-987a-8c44e896c596", "comment": "", @@ -13615,20 +13363,6 @@ "target": "return ${lesparents_asc}.at(${i})", "targets": [], "value": "parent" - }, { - "id": "8fb18bf9-8a78-48c5-ae2f-db1159d4f91a", - "comment": "", - "command": "//echo", - "target": "n=${num} ${numeroAffiche} ${nomAffiche} ${parentAffiche}", - "targets": [], - "value": "" - }, { - "id": "221f1257-2396-469f-893e-255530e1bfe5", - "comment": "", - "command": "//echo", - "target": "i=${i} ${numero} ${nom} ${parent}", - "targets": [], - "value": "" }, { "id": "e277d47e-deea-47b9-8ed6-dd74317e9038", "comment": "", @@ -13807,7 +13541,7 @@ "command": "storeXpathCount", "target": "xpath=//thead[@class=\"userOrder\"]//a[contains(@href, \"id_parent\")]", "targets": [], - "value": "titre_rattache" + "value": "existe_rattache" }, { "id": "bfbfca04-173c-4e86-b683-a814686e86b5", "comment": "", @@ -13917,7 +13651,7 @@ "id": "72fc596d-c276-4174-b8cf-c30c95ba89cc", "comment": "", "command": "if", - "target": "${titre_rattache} > 0", + "target": "${existe_rattache} > 0", "targets": [], "value": "" }, { @@ -13927,13 +13661,6 @@ "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::td[2]", "targets": [], "value": "parentAffiche" - }, { - "id": "c6b98c26-fea2-423c-8c6a-b494695e6378", - "comment": "", - "command": "//echo", - "target": "${numeroAffiche} : ${nomAffiche}, «${parentAffiche}»", - "targets": [], - "value": "" }, { "id": "95586fb9-f1f5-4fe8-ab73-3aee3d43277a", "comment": "", @@ -14004,76 +13731,6 @@ "target": "", "targets": [], "value": "" - }, { - "id": "f445d142-d2fc-4517-8a8b-4c20379fbf7c", - "comment": "Afficher les données mémorisées", - "command": "//echo", - "target": "Afficher les données mémorisées", - "targets": [], - "value": "" - }, { - "id": "75831550-cdc5-457e-8bbe-eba97bfadd94", - "comment": "", - "command": "//echo", - "target": "total = ${nb_total_membres}, parents = ${nb_parents}", - "targets": [], - "value": "" - }, { - "id": "48c86452-a294-4d81-9367-91390b3e4f20", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "i" - }, { - "id": "24554338-1517-4f5f-80ee-f30f14bfdc9c", - "comment": "", - "command": "//while", - "target": "${i} < ${nb_total_membres}", - "targets": [], - "value": "" - }, { - "id": "388949a1-7b3f-4588-93cd-196e1513e163", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnumeros}.at(${i}) ", - "targets": [], - "value": "num" - }, { - "id": "5f8395fa-44b1-46d9-9822-4f4133649e2f", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnoms}.at(${i})", - "targets": [], - "value": "nom" - }, { - "id": "04ab44dc-7cc2-4d1f-b715-5a141e8d3664", - "comment": "", - "command": "//executeScript", - "target": "return ${lesparents}.at(${i})", - "targets": [], - "value": "parent" - }, { - "id": "0c9f913a-43e7-4601-a4df-fa8449033722", - "comment": "", - "command": "//echo", - "target": "${num} : ${nom}, «${parent}»", - "targets": [], - "value": "" - }, { - "id": "031ae8a2-17e7-4bd7-96d1-dafe71d99a0c", - "comment": "", - "command": "//executeScript", - "target": "return ${i} + 1", - "targets": [], - "value": "i" - }, { - "id": "84eb4754-3dcd-4950-b105-0196019ca59f", - "comment": "", - "command": "//end", - "target": "", - "targets": [], - "value": "" }, { "id": "f8a6d4c3-f92a-46b6-997e-6e00eda3cb93", "comment": "Générer de nouveaux membres si nécessaire", @@ -14171,13 +13828,6 @@ ["xpath=//dd[3]/input", "xpath:position"] ], "value": "${nom}" - }, { - "id": "612b8ba8-36cf-4dae-b21c-5401dc6e0ba0", - "comment": "", - "command": "//echo", - "target": "Ajout de ${nom}", - "targets": [], - "value": "" }, { "id": "7cccf611-8a4b-4e31-982f-6546be582881", "comment": "sélectionner un parent parmi les membres présents", @@ -14185,13 +13835,6 @@ "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": "01bdcd8f-4994-4b66-ab23-b2dae211a88c", - "comment": "", - "command": "//echo", - "target": "parent = ${parent}", - "targets": [], - "value": "" }, { "id": "37b6d65b-4e89-4a59-a0ed-21f0031ce53b", "comment": "Ajouter parent à la liste", @@ -14244,13 +13887,6 @@ ["xpath=//input[2]", "xpath:position"] ], "value": "" - }, { - "id": "8962a236-6bfc-42e0-a4b5-a467dddc6665", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "nb" }, { "id": "3b637d77-7348-47e7-b7a7-43019f49e51b", "comment": "", @@ -14345,69 +13981,6 @@ "target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.parent); }); return resu;} return extraire(${membres_parent_dec})", "targets": [], "value": "lesparents_dec" - }, { - "id": "1a71ab3e-6333-40f4-b79d-d5972216f3a3", - "comment": "Afficher les infos triées par parent décroissant", - "command": "//echo", - "target": "Afficher les infos triées par parent décroissant", - "targets": [], - "value": "" - }, { - "id": "d82c92cc-5562-4689-91ab-56b5261428cf", - "comment": "", - "command": "//executeScript", - "target": "return 0", - "targets": [], - "value": "i" - }, { - "id": "ff9c92e0-a649-460c-a99c-94234c7120d2", - "comment": "", - "command": "//while", - "target": "${i} < ${lesnumeros_parent_dec}.length", - "targets": [], - "value": "" - }, { - "id": "31dbf1e7-1a74-4fe8-94f0-eb4b1cac341c", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnumeros_parent_dec}.at(${i})", - "targets": [], - "value": "num" - }, { - "id": "7b0420aa-2032-459e-9597-816208574c1c", - "comment": "", - "command": "//executeScript", - "target": "return ${lesnoms_parent_dec}.at(${i})", - "targets": [], - "value": "nom" - }, { - "id": "265c7b2d-abdc-46d5-a15b-90c6543f0018", - "comment": "", - "command": "//executeScript", - "target": "return ${lesparents_dec}.at(${i})", - "targets": [], - "value": "parent" - }, { - "id": "3a1b4c92-61ee-437e-bab9-16a72589c5b7", - "comment": "", - "command": "//echo", - "target": "${num} : ${nom}, ${parent}", - "targets": [], - "value": "" - }, { - "id": "c3436643-53b3-4379-9014-541b307c0ecf", - "comment": "", - "command": "//executeScript", - "target": "return ${i} + 1", - "targets": [], - "value": "i" - }, { - "id": "33360869-ba17-4ac8-a478-857af48d4bbc", - "comment": "", - "command": "//end", - "target": "", - "targets": [], - "value": "" }, { "id": "5cf11199-9c60-4e5f-a94c-f1ed064420d4", "comment": "Vérifier les membres", @@ -14442,14 +14015,14 @@ "command": "executeScript", "target": "return Number(${membres}.split(/ /)[0])", "targets": [], - "value": "nb_membres_cat" + "value": "nb_total_membres" }, { "id": "05603ef2-bf1b-4f18-8662-83f9cd936f60", "comment": "", "command": "assert", "target": "nb_noms", "targets": [], - "value": "${nb_membres_cat}" + "value": "${nb_total_membres}" }, { "id": "d7f81a4c-cf2b-4847-a21b-e914c20dea90", "comment": "Filtrer : toutes catégories même cachées", @@ -14482,233 +14055,135 @@ "id": "3f1dc67d-b1cd-4ddc-a147-03f22c37ddfc", "comment": "", "command": "if", - "target": "${nb_membres_cat} >= 2", + "target": "${nb_total_membres} >= 2", "targets": [], "value": "" }, { "id": "c495c1fc-9d9c-418f-bcb5-c72a7b1867b7", "comment": "", - "command": "executeScript", - "target": "return 1", - "targets": [], - "value": "num" - }, { - "id": "7dabd4cf-806e-4b12-91c7-9fd13ebe5e4e", - "comment": "chercher le premier parent non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "4283966f-e3b4-4fc6-8570-e5dbc0ac149d", - "comment": "", - "command": "while", - "target": "${num} <= ${nb_membres_page}", + "command": "if", + "target": "${nb_parents} >= 2", "targets": [], "value": "" }, { "id": "1fb96c41-b92e-487d-9685-7c74bea9c0f0", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[4]", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//td[4]", "targets": [], - "value": "premier_parent" - }, { - "id": "cbb32994-df16-439f-acd6-5a8fc9bc0736", - "comment": "", - "command": "if", - "target": "${premier_parent} != \"\"", - "targets": [], - "value": "" - }, { - "id": "81a230d1-447c-4aa6-a712-1bc23347c169", - "comment": "", - "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//th//span", - "targets": [], - "value": "nom_premier" - }, { - "id": "89f1d5aa-3ff6-4597-8a22-7791a3cb8ba1", - "comment": "", - "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span", - "targets": [], - "value": "numero1" - }, { - "id": "482eaa39-7c14-4845-8a6d-66bd9e2512b3", - "comment": "", - "command": "//echo", - "target": "${num} : ${numero1} ${nom_premier} ${premier_parent}", - "targets": [], - "value": "" - }, { - "id": "92d51377-cded-4281-a8df-bb5a9b0c1dfd", - "comment": "", - "command": "executeScript", - "target": "return Number(${numero1})", - "targets": [], - "value": "numero_premier" - }, { - "id": "86151da7-6342-48e4-b0b6-4aeef3a93498", - "comment": "trouvé", - "command": "executeScript", - "target": "return ${nb_membres_page} + 1", - "targets": [], - "value": "num" - }, { - "id": "8f1576b8-61d4-4e6f-ae71-ac91d480ebfe", - "comment": "", - "command": "else", - "target": "", - "targets": [], - "value": "" - }, { - "id": "7b7370d3-ce28-4498-a02e-ddfc2c3d7a8d", - "comment": "", - "command": "executeScript", - "target": "return ${num} + 1", - "targets": [], - "value": "num" - }, { - "id": "3b78f6c4-21c4-410e-bcfe-30fa4f2b14b0", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "3180e466-208f-4627-9c07-be71210f2dcf", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "a608fdf7-c8d9-402b-8ee1-e7ae48210d6d", - "comment": "chercher le dernier parent non vide", - "command": "", - "target": "", - "targets": [], - "value": "" - }, { - "id": "14c7fc16-cac7-4f65-b0cb-99e26a1b849b", - "comment": "", - "command": "executeScript", - "target": "return ${nb_membres_page}", - "targets": [], - "value": "num" - }, { - "id": "5f33b5e8-b9fe-42aa-82d9-609fe54dc3d9", - "comment": "", - "command": "while", - "target": "${num} > 0", - "targets": [], - "value": "" + "value": "parent1" }, { "id": "d3ed351b-f067-486d-bf7c-5f67d4727443", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]//td[4]", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[2]//td[4]", "targets": [], - "value": "dernier_parent" + "value": "parent2" }, { - "id": "79432e88-daf9-426d-855b-b86f64c6c430", - "comment": "", - "command": "if", - "target": "${dernier_parent} != \"\"", - "targets": [], - "value": "" - }, { - "id": "2e5c1bdc-08e9-4050-af49-3b80925f298c", + "id": "ee85bc32-e9cf-40f0-b2fa-3628cf76d53d", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]/following-sibling::th", + "target": "xpath=//table[@class=\"list\"]/tbody/tr[1]//th//span", "targets": [], - "value": "nom_dernier" + "value": "membre1" }, { - "id": "09a4173a-6aac-4dd2-a552-2b86db70b4a2", + "id": "08480205-ca0c-458c-b882-03dc3decdfdc", "comment": "", "command": "storeText", - "target": "xpath=//table[@class=\"list\"]/tbody/tr[${num}]/td[@class=\"num\"]//span", + "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": "3ac9f5bd-e7e0-43eb-9f3a-7d8699aecdc9", - "comment": "", - "command": "executeScript", - "target": "return Number(${numero2})", - "targets": [], - "value": "numero_dernier" - }, { - "id": "55cfd10b-64c5-4cc2-a02f-01e8fd3235e3", - "comment": "trouvé", - "command": "executeScript", - "target": "return 0", - "targets": [], - "value": "num" - }, { - "id": "1fbfb8d2-20cd-4a7b-aa81-c886307bbfc2", - "comment": "", - "command": "else", - "target": "", - "targets": [], - "value": "" - }, { - "id": "281eeb7b-a2a7-45ea-b896-6a8ffd2752f1", - "comment": "", - "command": "executeScript", - "target": "return ${num} - 1", - "targets": [], - "value": "num" - }, { - "id": "2d3afd51-a206-4e87-be85-efa952154b94", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "689af1e3-523d-471c-aebb-480f07d0ae94", - "comment": "", - "command": "end", - "target": "", - "targets": [], - "value": "" - }, { - "id": "78e8f1a5-e3ea-4cb6-b0dd-82401e6f4be8", - "comment": "", - "command": "//echo", - "target": "premier : ${premier_parent} - ${nom_premier} - ${numero_premier}", - "targets": [], - "value": "" - }, { - "id": "a21c39b4-0acf-4eb5-88b5-0927159794c1", - "comment": "", - "command": "//echo", - "target": "dernier : ${dernier_parent} - ${nom_dernier} - ${numero_dernier}", - "targets": [], - "value": "" - }, { - "id": "e0c1ac35-215a-4820-8830-7e7a89ce10ff", + "id": "0183a571-1576-43aa-8140-dab6fc90c664", "comment": "", "command": "if", - "target": "${premier_parent}.localeCompare(${dernier_parent}) < 0 || (${premier_parent}.localeCompare(${dernier_parent}) == 0 && ${nom_premier}.localeCompare(${nom_dernier}) < 0) || (${premier_parent}.localeCompare(${dernier_parent}) == 0 && ${nom_premier}.localeCompare(${nom_dernier}) == 0 && ${numero_premier} < ${numero_dernier})", + "target": "${parent1}.localeCompare(${parent2}) < 0 || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) < 0) || (${parent1}.localeCompare(${parent2}) == 0 && ${membre1}.localeCompare(${membre2}) == 0 && Number(${numero2}) < Number(${numero2}))", "targets": [], "value": "" }, { - "id": "d9a46634-81e5-4ee1-ac87-77e1a435ecbe", - "comment": "", - "command": "//echo", - "target": "Inverser sens tri", - "targets": [], - "value": "" - }, { - "id": "dc512674-c733-4cc5-b99d-130aa1d87bd8", + "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": "", @@ -14723,13 +14198,6 @@ "target": "", "targets": [], "value": "" - }, { - "id": "4f775176-ca23-408b-b8e1-414b1536ebe4", - "comment": "", - "command": "//echo", - "target": "nombre de membres sur la page = ${nb_membres_page}", - "targets": [], - "value": "" }, { "id": "e8b68e84-55cf-4734-9c2e-b9fc9e806583", "comment": "", @@ -14748,7 +14216,7 @@ "id": "a9322622-903f-4ca3-883d-c012c6764507", "comment": "Parcourir les membres enregistrés", "command": "while", - "target": "${num} <= ${nb_membres_cat}", + "target": "${num} <= ${nb_total_membres}", "targets": [], "value": "" }, { @@ -14769,9 +14237,9 @@ "id": "4239ae59-ba31-46e5-a409-d501e9cd5f29", "comment": "", "command": "executeScript", - "target": "return ${nb_membres_cat} - ${nb_membres_page}", + "target": "return ${nb_total_membres} - ${nb_membres_page}", "targets": [], - "value": "nb_membres_cat" + "value": "nb_total_membres" }, { "id": "a477027a-1239-4dc0-8f51-a10197932586", "comment": "", @@ -14835,20 +14303,6 @@ "target": "return ${lesparents_dec}.at(${i})", "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": "",