Skip to content

[Beginner] CSS selector doesn't seem to work? #2366

Answered by mdmintz
Saur-av asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a script to sign in to an existing Udemy account if you provide correct credentials:

from seleniumbase import SB

with SB(uc=True) as sb:
    sb.driver.get("https://www.udemy.com/")
    sb.click('a[data-purpose="header-login"]')
    sb.get_element('[name="email"]').send_keys("[email protected]")
    sb.get_element('[name="password"]').send_keys("PassWord")
    sb.click('button:contains("Log in")')
    breakpoint()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Saur-av
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants