This expression selects the first element with class="copyable-text" in the HTML and retrieves the value of its data-pre-plain-text attribute. If you run this XPath in a browser console, it should correctly return the value ["17:30, 10/12/2024"].
The other XPath expressions you tried might have selected the element, but without using getAttribute("data-pre-plain-text"), they wouldn’t have retrieved the attribute value directly.
$x("//*[@class='copyable-text']")[0].getAttribute("data-pre-plain-text")
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/3d18198f-dd8c-487c-9274-248a2c3a8a02n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/CALj1ryi4LOkLSntM7bt%2Bab3oHNhrvrDPxu2--P1G0Y8X2sk4%2Bg%40mail.gmail.com.