标签:google EAP 环境变量 drive image class enter storage imp
path
中,配置环境变量后建议重启系统以便生效。
如果你用的pip
,执行
pip install Selenium
但是我用的是Anconda
conda install Selenium
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
driver = webdriver.Chrome()
driver.get("https://www.jianshu.com")
try:
titles = driver.find_elements_by_class_name('title')
for ti in titles:
print(ti.text)
print('\n-----------------')
except NoSuchElementException as e:
print(e)
finally:
driver.close()
标签:google EAP 环境变量 drive image class enter storage imp
原文地址:https://www.cnblogs.com/zhangqiuchi/p/12151955.html