R
R
r1mple2021-10-05 16:02:15
Python
r1mple, 2021-10-05 16:02:15

How to find the id of an element on the site?

Let's say I have a div. I go to the site through selenium, I find this div by ID. How can I get the date parameter from this div?
<div id="justdiv" data="214345">.......</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
r1mple, 2021-10-05
@r1mple

Everything is done, most likely went a detour and an incredibly long way.
Through selenium, I prescribed a unique property for this diva.
And I parsed the entire text of the page as plain text, then found this element and got the date from it.

V
Vladimir Kuts, 2021-10-05
@fox_12

So you haven't tried it?
<найденный элемент>.get_attribute('data')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question