Skip to content

IntelliSense confusion for a noob #3402

Answered by mdmintz
tylerdurden4285 asked this question in Q&A

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 5 replies

You must be logged in to vote
2 replies
@biv88

@tylerdurden4285

Answer selected by mdmintz

You must be logged in to vote
1 reply
@mdmintz

You must be logged in to vote
2 replies
@mdmintz

@tylerdurden4285

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