Форум сайта python.su
Добрый вечер всем, сначала код
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver import TouchActions userAgent = 'Какой-то User Agent' mobile_emulation = {"deviceMetrics": {"width": 360, "height": 640, "pixelRatio": 3.0}, "userAgent": userAgent} chrome_options = Options() chrome_options.add_experimental_option("mobileEmulation", mobile_emulation) chrome_options.add_argument(f'user-agent={userAgent}') chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"]) chrome_options.add_experimental_option('useAutomationExtension', False) chrome_options.add_experimental_option('w3c', False) driver = webdriver.Chrome(options=chrome_options) driver.get('Адрес сайта') touch = TouchActions(driver) element = driver.find_element_by_xpath('//*[@id="-6538607497234628249"]/div/a') touch.tap(on_element=element).perform()
action = ActionChains(driver) action.drag_and_drop(el1, el2).perform()
Офлайн
Добрый
при выполнении данного кода выводится ошибка
selenium.common.exceptions.WebDriverException: Message: unknown command: Cannot call non W3C standard command while in W3C mode
может подскажите в как можно решить
Офлайн