Extract variable value that appears multiple time in webpage?

15 views
Skip to first unread message

Gamer

unread,
Aug 25, 2022, 12:40:14 AM8/25/22
to Selenium Users
Here is an example html segment:
<div data-cardid="355827" class="card card-style mx-1 mb-0 glow-1" data-rating="0">
Segments similar to this appear multiple times in the same webpage and my goal is to extract the value of 'data-cardid' in each of these segments. Is there a good way to extract the value of a variable such as this tha6t appears multiple times in one webpage?

Nortier David

unread,
Aug 25, 2022, 7:05:06 AM8/25/22
to seleniu...@googlegroups.com

Hello

 

With FindElements, no problem

 

De : seleniu...@googlegroups.com <seleniu...@googlegroups.com> De la part de Gamer
Envoyé : mardi 23 août 2022 01:52
À : Selenium Users <seleniu...@googlegroups.com>
Objet : [selenium-users] Extract variable value that appears multiple time in webpage?

 

Here is an example html segment:

<div data-cardid="355827" class="card card-style mx-1 mb-0 glow-1" data-rating="0">

Segments similar to this appear multiple times in the same webpage and my goal is to extract the value of 'data-cardid' in each of these segments. Is there a good way to extract the value of a variable such as this tha6t appears multiple times in one webpage?

--
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 on the web visit https://groups.google.com/d/msgid/selenium-users/aefe1ce3-c7f1-4f08-b3e7-f88fd9631b28n%40googlegroups.com.


====== DISCLAIMER ======

https://www.cph.be/maildisclaimer

Reply all
Reply to author
Forward
0 new messages