Defining custom actions in Selenium

I have a test case of Selenium that enters dates into a date selector consisting of three drop-down lists (year, month and day).

select validity_Y label=2008
select validity_M label=08
select validity_D label=08

This part is repeated many times throughout the test case. I would like to reduce it by specifying my custom action "selectValidity" so that I have less redundancy, something like

selectValidity 2008,08,08

What is the best (easiest, cleanest) way to add macros or routines to a test file?

+3
source share
2 answers

, Selenese. , ? java, . Net, perl, ruby, javascript, php python. . , IDE Selenese .

+3

, JS- JS user-extensions.js( UI-Elements). JS, selectValidity, DOM .

+3

Source: https://habr.com/ru/post/1697793/


All Articles