AttributeError:“字节”对象没有属性 'element_to_be_clickable'
from telnetlib import EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from time import sleep
from selenium.webdriver.support.select import Select
select = Select(wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="form-validation-field-0"]'))))
AttributeError: 'bytes' object has no attribute 'element_to_be_clickable'
答案 0 :(得分:0)
导入from telnetlib import EC
。您需要导入expected_conditions
并将其用作EC
from selenium.webdriver.support import expected_conditions as EC