设置超时

from selenium import webdriver
d= webdriver.PhantomJS()
d.set_page_load_timeout(10)
d.set_script_timeout(10)#这两种设置都进行才有效

原文地址:https://www.cnblogs.com/simadongyang/p/9904484.html