I have an if else statement nested in a for loop and I am trying to figure out a way to only run the program for the current feature (u) if the element exists. The element in question is a value in a select/option format. Basically, I need a certain option in that drop down menu to be present for the code to run and if it is not I would like to move onto the next url and try again. The option is either present or it's not (it won't pop up if the driver waits).
for u in urls:
bot.get(u)
if *statement to check if the value exists*:
-- runs my intended function --
else:
print("This site is not reporting yet")
Thank you.