Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python selenium find by class name

from selenium import webdriver
from time import sleep

''' FYI chromium webdriver '''
driver = webdriver.Chrome("path/to/chromedriver.exe")

driver.get("https://example.com")

sleep(3)

''' Let´s says your class name is mamor '''
elem = driver.find_elements_by_class_name('mamor')
# Do something with elem ...
sleep(3)

''' Please don´t forget to close your driver '''
driver.close()
 
PREVIOUS NEXT
Tagged: #python #selenium #find #class
ADD COMMENT
Topic
Name
1+4 =