I\'m trying to create a dynamic \"element map\" of the elements displayed inside a banner menu including the link displayed for each menu. This map will be stored inside a
The answer is No. You cannot extract a CSS selector from a WebElement.
Why? Because the WebElements themselves are found by the By class.. What if the By specified was xpath? How would it populate the CSS selector?
By
xpath