Skip to content
Advertisement

xpath inside founded elements using selenium

I found 10 elements using:

JavaScript

Then i’m trying get information from collected divs by xpath in cycle:

JavaScript

But always i get first element


Question: Is it possible to get information from each block in cycle using relative xpath with already founded element by selenium?


One of divs HTML:

JavaScript

Advertisement

Answer

Yes, you can easily find each block data using relative xpath .So you have to make relative xpath using .//

JavaScript
Advertisement