Пока я мне удалось найти нужную мне ссылку и щелкнуть по ней. Я пытаюсь отправить клавиши CTRL + S и ENTER, но постоянно получаю сообщение об ошибке.
Сведения об ошибке:
Код: Выделить всё
File "c:\Users\Victor\Desktop\Selenium\main.py", line 19, in
open_link.send_keys(Keys.CONTROL + "s")
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'send_keys'
Код: Выделить всё
import selenium
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("https://www.examtopics.com/discussions/comptia/94/")
driver.implicitly_wait(0.5)
search = driver.find_element(By.PARTIAL_LINK_TEXT, "CAS-004")
open_link= search.click()
open_link.send_keys(Keys.CONTROL + "s")
open_link.send_keys(Keys.ENTER)
Подробнее здесь: https://stackoverflow.com/questions/792 ... ith-python