Using Python and Splinter, currently, I need to define exactly what text, option1
to click on when an option is found on a page:
from splinter import Browser
browser = Browser('chrome')
browser.find_option_by_text(option1).first.click()
But if the option1
is not there, how can I fall back and choose any next option available rather than having to define it?
And is it possible to just find an option on a page and choose any first, available option encountered, without having to define the option?
Thank you in advance and will be sure to upvote/accept answer