D
D
Danila Rumyantsev2022-01-15 23:13:22
Python
Danila Rumyantsev, 2022-01-15 23:13:22

How to write a message using selenium if there is no input tag in the html code?

I'm trying to enter text on the site, but there is no input tag in the Html code, so which element I don't take selenium freaks out that the element is not clickable, how to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2022-01-16
@Bubunduc

You can try like this:

pseudo_input = driver.find_element_by_css_selector(".btn") # ну или что там у тебя за элемент
( selenium.webdriver.common.action_chains.ActionChains(driver)
    .move_to_element(pseudo_input)
    .click(pseudo_input)
    .send_keys_to_element(pseudo_input, *keys_to_send)
    .perform()
)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question