2

I wrote a bot for AliExpress Bonus Buddies [https://sale.aliexpress.com/__mobile/daily-cash-out-gaming_m.htm?_addShare] It's working great before the update, ever since the update If I generate a click/touch from selenium, it gives Security Error. I am using Detectable Chrome Driver and I even have test case, so it can reproducible Github Issue: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/42

Test Case:

import undetected_chromedriver as uc
from undetected_chromedriver import ChromeOptions
uc.install()
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver import TouchActions
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import time

options = ChromeOptions()
tempoptions = Options()
caps = DesiredCapabilities().CHROME
caps["pageLoadStrategy"] = "eager"
options.add_experimental_option('w3c', False)
mobile_emulation = { "deviceName": "iPhone X" }
options.add_experimental_option("mobileEmulation", mobile_emulation)
options.add_argument('--lang=en')
options.add_argument("--log-level=3")
count = 0

driver = webdriver.Chrome(executable_path='./chromedriver.exe', desired_capabilities=caps, chrome_options=options)
driver.set_page_load_timeout(60)
driver.get("https://login.aliexpress.com/h5.htm?type=login&fromMsite=true")


WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.ID, 'fm-login-id'))
    ).send_keys('syntist03@protonmail.com')

WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.ID, 'fm-login-password'))
    ).send_keys('zoner123')


input('pause')

WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.CSS_SELECTOR, '.fm-button'))
    ).click()

time.sleep(4)

driver.get("https://sale.aliexpress.com/__mobile/daily-cash-out-gaming_m.htm?_addShare")


touch_actions = TouchActions(driver)

element = WebDriverWait(driver, 10).until(
            EC.presence_of_all_elements_located((By.CSS_SELECTOR , '.goBtn___3aVca'))
    )[2]
time.sleep(5)
element.click()

input('pause')

Security error image: enter image description here

Evgeniy Chiruk
  • 358
  • 1
  • 10
Syntist
  • 21
  • 1
  • You're not initializing the driver with undetected-chromedriver. Maybe try using [Selenium-Profiles](https://github.com/kaliiiiiiiiii/Selenium-Profiles) and wrap it around (`uc_driver=True`) – kaliiiiiiiii Mar 10 '23 at 07:28

0 Answers0