E
E
EnderToy2021-11-06 17:07:44
Python
EnderToy, 2021-11-06 17:07:44

How to insert string in h1 selenium?

Hello. Is it possible to enter the title of a VK article through a web browser with the '--headless' argument?
I poked around in the html code but didn't find anything. The name is contained only in . I didn't find any imputs. What to do is not clear.
I thought to click ctrl + v, but in "stealth mode it will not work"
61868c6085d65887023457.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-06
@SoreMix

Using JS to find the element and replace its text

driver.execute_script('''document.getElementsByTagName("h1")[0].innerHTML = "test";''')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question