Skip to content

How to override Chromedriver #2310

Answered by mdmintz
drFrankWhite asked this question in Q&A
Discussion options

You must be logged in to vote

SeleniumBase automatically takes care of driver management. All you have to do is decide on the syntax format that you want to use from SeleniumBase/help_docs/syntax_formats.md.

For example, the SB() context manager format:

from seleniumbase import SB

with SB() as sb:
    sb.open("seleniumbase.io/simple/login")
    sb.type("#username", "demo_user")
    sb.type("#password", "secret_pass")
    sb.click('a:contains("Sign in")')
    sb.assert_exact_text("Welcome!", "h1")
    sb.assert_element("img#image1")
    sb.highlight("#image1")
    sb.click_link("Sign out")
    sb.assert_text("signed out", "#top_message")

Here's a raw driver format:

driver = Driver()
try:
    driver.open("seleniumbase.…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@drFrankWhite
Comment options

@mdmintz
Comment options

@drFrankWhite
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