Проблема в том, что мне по какой-то причине не удается обнаружить кнопку на данном сайте-"
https://app.1inch.io/#/1/simple/swap/ETH"
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
import pyautogui
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
s = Service(executable_path='C:/Users/admin/Desktop/System_cr/chromedriver.exe')
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
options.add_argument("--user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'")
#options.add_extension('extension_10_34_3_0.crx')
#options.add_argument("user-data-dir=C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\User Data")
options.add_argument("--disable-blink-features=AutomationControlled")
options.add_experimental_option("excludeSwitches", ["eneble-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options, service=s)
driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
'source': '''
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Array;
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Promise;
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Symbol;
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Proxy;
delete window.cdc_adoQpoasnfa76pfcZLmcfl_Object;
'''
})
silk = "https://app.1inch.io/#/1/simple/swap"
driver.get(silk)
wait = WebDriverWait(driver, timeout=2)
button1 = driver.find_element(By.XPATH, '//*[@id="uni"]/div/div[2]/unified-swap-container/unified-swap-form/source-token-input/token-select-input/div[2]/div[1]/a/token-select-button').click()
time.sleep(0.5)
вот кусок кода, попробуйте запустить программу у себя.
буду очень признателен, если поможете с данной задачей