Closed adarmawan117 closed 2 months ago
Your problem code is here:
for elem in elements:
sb.highlight(elem, loops=6)
sb.highlight()
expects a selector for the first argument. You passed a WebElement
.
Yes, right. How can i ekstrak selector from that list.? I mean, for every element of that list.
So, i can highlight all the element.
In the next version of SeleniumBase, I'll update the sb.highlight()
method so that a WebElement
can also be passed.
Love it. Thanks Sir... ❤️
Updates made: https://github.com/seleniumbase/SeleniumBase/issues/2747
Upgrade to 4.26.3
(or newer if available).
Don't forget to Star ⭐ SeleniumBase on GitHub: https://github.com/seleniumbase/SeleniumBase/stargazers
Really love it. I use this feature to change my code. And make it more interactive.
elements = sb.find_visible_elements('//*[@data-testid="master-product-card"]')
# sb.driver.execute_script("arguments[0].scrollIntoView();", elements[-1]) # CHANGE THIS CODE
sb.highlight(elements[-1])
I want to highlight all the element from sb.find_visible_elements(). This is my code
This code give me error