Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to find element in selenium by class

from selenium import webdriver
from selenium.webdriver.common.by import By # Very important to import this



my_variable = driver.find_element(by=By.CLASS_NAME, value="name_of_my_class")

Comment

find elements by class name selenium python

# find elements by class name selenium python
from selenium.webdriver.common.by import By

driver.find_element(By.CLASS_NAME, "HazaaZOOZ")
 
Comment

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()
Comment

PREVIOUS NEXT
Code Example
Python :: create pyspark session with hive support 
Python :: import all images from folder python 
Python :: how to find where python is located 
Python :: py for line in file 
Python :: pandas dataframe histogram 
Python :: list all files of a directory in Python 
Python :: brownie get active network 
Python :: PySpark columns with null or missing values 
Python :: how to click in selenium 
Python :: send dm discord py 
Python :: remove unicode from string python 
Python :: how to know python bit version 
Python :: virtualenv with specific python version 
Python :: how to make otp generator in python 
Python :: opening image in python 
Python :: skimage image read 
Python :: link python3 to python3.7 
Python :: filter dataframe by index 
Python :: get max pixel value python 
Python :: edge detection opencv python 
Python :: No default language could be detected for django app 
Python :: get parameters flask 
Python :: how to replace nan with 0 in pandas 
Python :: p-norm of a vector python 
Python :: check empty dataframe 
Python :: python gt index in for cycle 
Python :: detect stop codon 
Python :: function python to get the minimu and its position 
Python :: upgrade python to 3.9 i linux 
Python :: how to install library in python 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =