IntelliSense confusion for a noob #3402
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class NullTests(BaseCase):
def test_null(self):
pass To get autocomplete working from The reason Inside help_docs/method_summary.md you'll find regular methods at the top and middle. The UC Mode method list is at the bottom. And CDP Mode methods can be found in the second half of examples/cdp_mode/ReadMe.md. |
Beta Was this translation helpful? Give feedback.
-
I did this:
```
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
```
So then to use sb I do it like this?
![image](https://github.com/user-attachments/assets/f218af79-3d36-468e-b4ee-ff109bcced80)
perhaps like this or similar is better?
![image](https://github.com/user-attachments/assets/2fb46776-f910-446d-9190-b689bcdc1aac)
|
Beta Was this translation helpful? Give feedback.
-
Even with the link you provided here's what I am having trouble doing all together at the same time.
Things work great with pytest but using python seems to complicate it a bit. The examples I've found from your site allow a solution to all 3 but not at the same time. What is an example of code that would allow all three for someone that just wants to use seleniumbase with python only and not have to name things test_ (pytest style) and still have intellisense? |
Beta Was this translation helpful? Give feedback.
The
BaseCase.main(__name__, __file__)
lets you kick offpytest
when calling the script with purepython
.Here's the most basic example of that:
To get autocomplete working from
SB()
scripts, use abreakpoint()
. Then all methods will appear from the debugger.The reason
SB()
methods don't appear withIntelliSense
is because the methods get defined at runtime because different modes have different methods. (Eg. UC Mode and CDP Mode add different methods intoSB()
.) Different methods based on the mode.Inside help_docs/method_summary.md you'll find regular met…