AttributeError: у объекта 'bytes' нет атрибута 'element_to_be_clickable' - PullRequest
0 голосов
/ 07 ноября 2019

AttributeError: у объекта 'bytes' нет атрибута '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'

1 Ответ

0 голосов
/ 07 ноября 2019

Импорт from telnetlib import EC. Вам необходимо импортировать expected_conditions и использовать его как EC

from selenium.webdriver.support import expected_conditions as EC
...