You can access the element if it has multiple classes using “By”:
from selenium.webdriver.common.by import By
driver.findElement(By.cssSelector(".alert.alert-success"));
More Related Contents:
- How to handle dynamically changing ID’s on refresh? [closed]
- How to create Gmail account using Selenium, I am having trouble with month and country drop downs
- Difference between webdriver.Dispose(), .Close() and .Quit()
- How to handle login pop up window using Selenium WebDriver?
- Unable to locate SVG elements through xpath on Kendo UI chart
- Chrome not reachable Selenium WebDriver error
- What is the use of DesiredCapabilities in Selenium WebDriver?
- Java.io.IOException: Invalid Status code=403 text=Forbidden
- How to handle file download popup using Selenium WebDriver?
- JavaScript Executor in Selenium WebDriver
- Is it possible to switch to an element in a frame without using driver.switchTo().frame(“frameName”) in Selenium Webdriver Java?
- Execute JavaScript using Selenium WebDriver in C#
- Way to change Google Chrome user agent in Selenium?
- MaxRetryError: HTTPConnectionPool: Max retries exceeded (Caused by ProtocolError(‘Connection aborted.’, error(111, ‘Connection refused’)))
- Server terminated early with status 1 error with Selenium for ChromeDriver and Chrome Browser and the log message “Only local connections are allowed”
- Tests fail immediately with unknown error: DevToolsActivePort file doesn’t exist when running Selenium grid through systemd
- How to install extension permanently in geckodriver
- In protractor, browser.isElementPresent vs element.isPresent vs element.isElementPresent
- java.lang.IllegalStateException: The driver executable does not exist: while trying to execute tests through Selenium, ChromeDriver and Chrome
- Tools for measuring UI Performance [closed]
- How to type some text in hidden field in Selenium WebDriver using Java
- Difference of Headless browsers for automation
- How to send text to the Password field within https://mail.protonmail.com registration page?
- What is the difference between a CSS selector and XPath? And which is better with respect to performance for cross-browser testing?
- How to disable CSS in Python Selenium using ChromeDriver using ChromeOptions
- Selenium – Python – AttributeError: ‘WebDriver’ object has no attribute ‘find_element_by_name’
- ‘sendKeys’ are not working in Selenium WebDriver
- isElementPresent is very slow in case if element does not exist.
- Disable images in Selenium Python
- ExpectedConditions.ElementIsVisible returns TimeoutException even when element is present