我在 python 代码中收到此错误:
Traceback (most recent call last):
File "/Users/user/Batch-image-compression/compress_pic.py", line 54, in <module>
**input_box = driver.find_element(By.XPATH,'//input[@class="_2zg9i"]')**
NameError: name 'By' is not defined
Run Code Online (Sandbox Code Playgroud)
在我的脚本中我有:
from selenium.webdriver.common import By
Run Code Online (Sandbox Code Playgroud)
显示错误:
来自:无法读取/var/mail/selenium.webdriver.common
python-3.x ×1