P
P
Plotnik Plotniy2022-02-22 19:36:28
Python
Plotnik Plotniy, 2022-02-22 19:36:28

Why is Selenium not inputting data into the Wildberries form?

Hello everyone I have the following task, I need selenium to automatically enter numbers into the input form on the wildberries website, I tried this code for VK - everything works, but for some reason it doesn’t work on Wildberries, Thank you in advance to everyone !!!

Here is the code

from selenium import webdriver
from fake_useragent import UserAgent
from selenium.webdriver.common.by import By
import time
import json

ua = UserAgent()
# OPTIONS
options = webdriver.ChromeOptions()
options.add_argument(f'user-agent={ua.random}')

options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
# ------

# DRIVER
driver = webdriver.Chrome(executable_path='driver/chromedriver.exe', options=options)
driver.maximize_window()
# -------

try:
    url = ('https://www.wildberries.ru/security/login?returnUrl=https%3A%2F%2Fwww.wildberries.ru%2F')
    driver.get(url=url)
    time.sleep(5)

    email_input = driver.find_element( By.XPATH, '//*[@id="index_email"]')
    email_input.clear()
    email_input.send_keys("28041928")

    time.sleep(20)
except Exception as ex :
    print(ex)

finally:
    driver.close()
    driver.quit()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2022-02-22
@dimonchik2013

because like this

@id="index_email

On the page
https://www.wildberries.ru/security/login?returnUrl=https%3A%2F%2Fwww.wildberries.ru%2
F

no

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question