Hi Victor, Yes, assign a class or id to the element. This is done several times in basic_workflow.t Cheers, Jonathan Le jeu. 30 sept. 2021 à 00:25, Victor Grousset/tuxayo <victor@tuxayo.net> a écrit :
Hi :)
I'm writing an UI test for creating a club to later use it for holds. In the page /cgi-bin/koha/clubs/clubs.pl There is the button "New club" , I would like to click on it but it has nothing in the classes or id that tells it's this button.
I could use a vague and fragile in the long run selector like ".main .dropdown-toggle" and comment explaining what it is.
Or I could add a class like "new-club" to the <button>
Maybe there is a way I missed to have a readable, concise and durable way to click on the dropdown button but the question will still stand for a future case way there won't be such a way.
Also maybe there is better class name than "new-club". The naming practice is also an important question.
Cheers,
-- Victor Grousset/tuxayo _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/