Asked
Active
Viewed 205 times
1
-
The picture I added is missing for some reason, https://imgur.com/a/3Tn2dn5 – Revanth MK May 05 '20 at 21:13
2 Answers
0
You would need to use JavaScript to access the pseudo element ::before
. You can look at this answer here and try modifying it: https://stackoverflow.com/a/43892892/4323004
browser.execute_script("return window.getComputedStyle(document.querySelector('.SomeTitle .bar'),':before').getPropertyValue('content')")

Lorn
- 194
- 1
- 5
0
You can use the the core function from WebDriver.findElements. Pass to this the xpath: "identify_parent_spans/span" where 'identify_parent_span is the xpath for identify the node where the phone number is located. After have the array of spans iterate over it and execute getText for each element and build the phoneNumber string.

Vayas Zsolt Marton
- 67
- 7