여기에 내 코드가 있습니다.ImportError : 'webdriver'이름을 가져올 수 없습니다.
import sys
print (sys.path)
from selenium import webdriver
from selenium.webdriver.common.by import BY
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
usernameStr = 'email'
passwordStr = 'password'
browser = webdriver.Chrome()
browser.get('http://website.com')
username = browser.find_element_by_xpath('//*[@id="did-ui"]/div/div/section/section/form/section/div[1]/div/label/span[2]/input')
username.send_keys(usernameStr)
password = browser.find_element_by_xpath('//*[@id="did-ui"]/div/div/section/section/form/section/div[2]/div/label/span[2]/input')
password.send_keys(passwordStr)
nextButton = browser.find_element_by_xpath('//*[@id="did-ui"]/div/div/section/section/form/section/div[3]/button[1]')
nextButton.click()
나는 내가 오류가 계속 왜
['/Users/austinjohnson/Desktop/streakscraper', '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/site-packages']
Traceback (most recent call last):
File "/Users/austinjohnson/Desktop/streakscraper/login.py", line 6, in <module>
from selenium import webdriver
ImportError: cannot import name 'webdriver'
[Finished in 0.1s with exit code 1]
[cmd: ['/usr/local/bin/python3', '-u', '/Users/austinjohnson/Desktop/streakscraper/login.py']]
[dir: /Users/austinjohnson/Desktop/streakscraper]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
내가 알아낼 수 없습니다, 나는이 오류를 실행합니다. 액세스 권한을 부여하기 위해 경로를 변경하려고했지만 오류가 발생합니다. 어쩌면 내가 잘못한 것을했을 수도 있지만 알아낼 수는 없습니다.
나는 이미 확인했다. 셀레늄이라는 파일이 없습니다. – tin