from selenium import webdriver
w1=webdriver.Firefox()
def f1():
w1.get("dagsb.com")
def f2():
w1.get("google.com")
I have the above code snippet. I want to try to call f1()
and if it throws an error (which it does as dagsb.com doesnt exist) I want to call f2()
How can I do so?