ClericPy / ichrome

Chrome controller for Humans, based on Chrome Devtools Protocol(CDP) and python3.7+.
https://pypi.org/project/ichrome/
MIT License
227 stars 29 forks source link

select elements by xpath? #133

Closed juanfrilla closed 1 year ago

juanfrilla commented 1 year ago

with selenium I could do:

driver.find_elements(By.XPATH, "//*[contains(text(), 'Pepe Juan')]")

But here i don't know how to do that

ClericPy commented 1 year ago

xpath is never better than css selector for now...

you can use tab.js with Javascript for xpath, or use await tab.html and parse it with lxml