Skip to content

Create an Instance of SB without context #2595

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

You must be logged in to vote

For the SB() / BaseCase formats (seen in help_docs/syntax_formats.md), there must always be a beginning AND an end. That way everything can be properly set up in the beginning, and properly closed at the end. Without a context manager format, there's no way of knowing when the end is reached. When used for website testing, the end part also includes code for generating test reports, etc.

For just the variable/object with no end code, there's the Driver() format, which has limited functionality. The Driver() object expects you to close the browser on your own via driver.quit() (to prevent memory leaks). The Driver() object also expects you to handle virtual display setup and teardown on yo…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pol4xer
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