For the picture below, I wish to perform an automation testing which is random click on the items and save it. Is this consider as a list?
Selenium Python
CodePudding user response:
Use the one that suits the format you have the elements in. If you have a list of the elements themselves, random.choice
is the better option; if you only have the number of elements, you might prefer random.randint
.