Python Forum
Div Class HTML selector in Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Div Class HTML selector in Python (/thread-41157.html)



Div Class HTML selector in Python - Artur - Nov-20-2023

Dears ,

i'm an iniciante in python and i'm working in a project to find a selector in HTML website

I'm using this structure as per below however the Pyhton is not finding the selector and besides this don't execute any function when reach this line on code and also revert with a error (attached)

jogar_roleta = WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'div.images-container.new')))
jogar_roleta.click()

The field on HTML has this structure (attached)

<div class="images-container new" style="background-color: rgb(30, 30, 30);">...</div>

<div class="image-holder">...</div>

Am i selecting the wrong class?

We would appreciate to receive comments


RE: Div Class HTML selector in Python - StevenSnyder - Mar-28-2024

Thanks