在课堂上的有用到try捕捉异常
try: driver.implicitly_wait(10) driver.get('https://www.jd.com/') input_tag.send-keys('中华字典') input_tag.send_keys(Keys.ENTER) time.sleep(10) except Exception as e : finally: driver.close()
在课堂上的有用到try捕捉异常
try: driver.implicitly_wait(10) driver.get('https://www.jd.com/') input_tag.send-keys('中华字典') input_tag.send_keys(Keys.ENTER) time.sleep(10) except Exception as e : finally: driver.close()