Home > Software engineering >  Checking a frame with Selenium Python
Checking a frame with Selenium Python

Time:12-12

i´m new using selenium for automation.

Im trying to make an automatic login for HBO Max (Practice purposes only), i can type in both fields (e-mail and password) and try if it logs in but. I want to check if it failed or not, i understand that for checking that i have to check if there appears the frame with the Fail Text but i don´t know how to switch to it´s frame for checking it.

enter image description here

This element can be uniquely locaoted by this CSS Selector: [aria-label*='Error']
Or with Python Selenium code:

if driver.driver.find_elements(By.CSS_SELECTOR,"[aria-label*='Error']"):
    print("Wrong credentials inserted")
  • Related