Home > Back-end >  Selenium find a element with no class, div, text (Python)
Selenium find a element with no class, div, text (Python)

Time:09-08

I want to make a automatic google login with selenium but i cannot find the elements, the buttoenter image description heren "Next", because the class is modified each time when we come to start a browser with selenium, or when we reset the login page and does not have Id, but the button is in a div that includes just this button, I would like someone to help me find a solution to find how I can use this button in order to click it to skip the page where you have to put your email address to skip to the password

i would like to use css selector

(Google Chrome the browser I use) I code with Selenium 4.2.0 on Linux Unbuntu

CodePudding user response:

driver.find_element(By.CSS_SELECTOR, 'button[]').click()

That will click the 'Next' button on Google login. Good luck getting any further though. Google seems to block logging in on Chromium.

CodePudding user response:

You can either use jsname as an alternative for finding the element I found a similar question here How can I inspect element in to div with jsname? I think the person is doing pretty same thing Hope this helps :)

  • Related