51Testing软件测试论坛
标题:
python :EC模块中没有url_contains方法
[打印本页]
作者:
测试积点老人
时间:
2021-11-23 13:10
标题:
python :EC模块中没有url_contains方法
EC中没有url_contains方法,而且url开头的方法都没有。是怎么回事?
[attach]135412[/attach]
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
driver = webdriver.Chrome(executable_path="D:\chromedriver\chromedriver.exe")
class TrainSpider(object):
login_url = "https://kyfw.12306.cn/otn/resources/login.html"
personal_url = "https://kyfw.12306.cn/otn/view/index.html"
def __init__(self,from_station,to_station,train_date):
self.from_station = from_station
self.to_station = to_station
self.train_date = train_date
def login(self):
driver.get(self.login_url)
WebDriverWait(driver,1000).until(
EC.u
)
print("登录成功")
def run(self):
self.login()
def main():
spider = TrainSpider("北京","上海","2021-11-23")
spider.run()
if __name__ == '__main__':
main()
复制代码
作者:
海海豚
时间:
2021-11-24 09:30
重新下载一下这个库
作者:
qqq911
时间:
2021-11-24 11:34
检查下库的版本
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2