我要输入登录名,密码,然后按现场登录按钮。 但是python会出错。
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
driver = webdriver.Chrome('chromedriver.exe')
driver.get("someSite")
content = driver.find_element_by_class_name('tabs-form__tab')
content.click()
WebDriverWait(driver,2).until(EC.presence_of_element_located((By.NAME,"email")))
driver.find_element_by_name("email").send_keys("someEmail")
Traceback (most recent call last):
File "C:\Users\user\Desktop\Python projects\webServer", line 17, in <module>
driver.find_element_by_name("email").send_keys("someEmail")
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 479, in send_keys
'value': keys_to_typing(value)})
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: call function result missing 'value'
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f), platform=Windows NT 10.0.17134 x86_64)