Skip to content

IntelliSense confusion for a noob #3402

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

You must be logged in to vote

The BaseCase.main(__name__, __file__) lets you kick off pytest when calling the script with pure python.
Here's the most basic example of that:

from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)

class NullTests(BaseCase):
    def test_null(self):
        pass

To get autocomplete working from SB() scripts, use a breakpoint(). Then all methods will appear from the debugger.

The reason SB() methods don't appear with IntelliSense is because the methods get defined at runtime because different modes have different methods. (Eg. UC Mode and CDP Mode add different methods into SB().) Different methods based on the mode.

Inside help_docs/method_summary.md you'll find regular met…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Comment options

You must be logged in to vote
1 reply
@mdmintz
Comment options

Comment options

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