尝试在https://www.mobile.ir/users/account/login.aspx中的电子邮件区域中输入文本,但出现错误我尝试使用 webdriverwait 但它没有工作感谢提前听到我的代码:
import time
import datetime
import random
from selenium.webdriver.chrome.options import Options
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
ch_options=Options()
ch_options.add_argument("--user-data-dir=chrome-data")
chrome=webdriver.Chrome(options=ch_options,executable_path="/Users/LENOVO/Desktop/chromedriver.exe")
ch_options.add_argument("user-data-dir=chrome-data")
chrome.get("https://www.mobile.ir/users/account/login.aspx")
chrome.find_element_by_name("email").send_keys("myemail")
我得到这个错误:
File "C:\Users\LENOVO\PycharmProjects\mobile.ir\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\LENOVO\PycharmProjects\mobile.ir\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=83.0.4103.116)
长风秋雁
相关分类