I am looking for the way to click on the button which is located in HTML this way:
<button class="MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButtonBase-root css-1rs4rtx" tabindex="0" type="button"> Zaloguj się<span class="MuiTouchRipple-root css-w0pj6f"></span></button>
I tried a few ways to find this without any success.
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
# Web credentials
username = "qwerty@gmail.com"
password = "qwerty"
# Initialize the Chrome driver
driver = webdriver.Chrome("chromedriver")
# Head to login page
driver.get("https://tzgirls.app/login")
# Find username/email field and send the username itself to the input field
driver.find_element("id", "login_email").send_keys(username)
# Find password input field and insert password as well
driver.find_element("id", "login_password").send_keys(password)
#import time
#time.sleep(2)
wait = WebDriverWait(driver, 20)
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[contains(text(),'Zaloguj się')]"))).click()
How can I do it?