Пишу код который, в соответствующем поле введёт текст и сначала нажмет на одну кнопку потом на другую. Так вот первые 2 действия код делает но на другую кнопку нажимать не хочет. Вот код:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
from time import sleep
while True:
browser = webdriver.Chrome(ChromeDriverManager().install())
browser.get('https://funpay.com/lots/83/')
browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
find_input = browser.find_element(By.NAME, 'desc') # Find the search box
find_input.send_keys('4 lvl' + Keys.RETURN)
find_button = browser.find_element(By.CSS_SELECTOR, "#content > div > div.container > div > div.layout-swap.layout-swap-disabled > div.with-tbl-footer > div > div.tc.table-hover.table-clickable.tc-short.showcase-table.tc-lazyload.tc-sortable > div > div.tc-price.sort")
find_button.click()
get_href = browser.find_element(By.CSS_SELECTOR, '#content > div > div.container > div > div.layout-swap.layout-swap-disabled > div.with-tbl-footer > div > div.tc.table-hover.table-clickable.tc-short.showcase-table.tc-lazyload.tc-sortable > a:nth-child(2)')
get_href.click()
sleep(20)
Вот ошибка:
Traceback (most recent call last):
File "C:\Users\DELL\Desktop\fun pay bot\4.py", line 23, in <module>
get_href.click()
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 88, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 396, in _execute
return self._parent.execute(command, params)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 428, in execute
self.error_handler.check_response(response)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable