P
P
PyotR3213ty542022-02-21 21:58:38
Python
PyotR3213ty54, 2022-02-21 21:58:38

How to find elements on an encrypted web page with Selenium?

I'm trying to authorize an account on rambler.ru using Selenium in Python.
When searching for the login input field from the mail, an exception flies:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@class='rui-Input-input -motrika-nokeys']"}
  (Session info: chrome=98.0.4758.102)

The program code itself:
from selenium import webdriver

email = "[email protected]"
password_email = "qO&Vgvebui4bfw"

DRIVER = 'chromedriver'
driver = webdriver.Chrome(DRIVER)

driver.maximize_window()

# открываем сайт
driver.get("https://mail.rambler.ru/?utm_source=head&utm_campaign=self_promo&utm_medium=header&utm_content=mail")

# вводим логин почты
# поле логина почты
email_field = driver.find_element_by_xpath("//input[@class='rui-Input-input -motrika-nokeys']").click()
email_field.send_keys(email)

If you take the source code of the page, you can see that the code is encrypted. How can you find a specific element with selenium?
Before starting the program, you need to download chromedriver.exe: https://chromedriver.storage.googleapis.com/index....

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question