-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Import seleniumbase in visual studio code #1125
-
Hi there,
First of all I want to thank you for the amazing framework.
I'm a junior QA started working for a startup company and they want me to start automation testing on python.
I wanted to ask you, how do I import seleniumbase on visual studio code after I installed seleniumbase :)
Beta Was this translation helpful? Give feedback.
All reactions
Hello @Binyamin999, and welcome!
Once you've installed seleniumbase, you can create a Python file like the one below, and then run it with pytest
from the terminal. :)
from seleniumbase import BaseCase
class DemoSiteTests(BaseCase):
def test_demo_site(self):
self.open("https://seleniumbase.io/demo_page")
self.type("#myTextInput", "This is Automated")
self.type("textarea.area1", "Testing Time!\n")
self.type('[name="preText2"]', "Typing Text!")
self.assert_text("This Text is Green", "#pText")
self.click("#myButton")
self.assert_text("This Text is Purple", "#pText")
Replies: 1 comment 9 replies
-
Hello @Binyamin999, and welcome!
Once you've installed seleniumbase, you can create a Python file like the one below, and then run it with pytest
from the terminal. :)
from seleniumbase import BaseCase
class DemoSiteTests(BaseCase):
def test_demo_site(self):
self.open("https://seleniumbase.io/demo_page")
self.type("#myTextInput", "This is Automated")
self.type("textarea.area1", "Testing Time!\n")
self.type('[name="preText2"]', "Typing Text!")
self.assert_text("This Text is Green", "#pText")
self.click("#myButton")
self.assert_text("This Text is Purple", "#pText")
Beta Was this translation helpful? Give feedback.
All reactions
-
@Binyamin999 The terminal is the same for all files. Unless you're using a virtual environment, (which is recommended for local machines), then after running pip install seleniumbase
in a terminal, you should be able to run any SeleniumBase test with pytest
.
Beta Was this translation helpful? Give feedback.
All reactions
-
@Binyamin999 The terminal is the same for all files. Unless you're using a virtual environment, (which is recommended for local machines), then after running
pip install seleniumbase
in a terminal, you should be able to run any SeleniumBase test withpytest
.
When I run pip install seleniumbase in a terminal, I still have the same error, that i need to import seleniumbase.
What should I do?
Is it possible to share my screen recording?
Beta Was this translation helpful? Give feedback.
All reactions
-
@Binyamin999 Can you share a screen recording? Or we can chat directly on https://gitter.im/seleniumbase/SeleniumBase
Beta Was this translation helpful? Give feedback.
All reactions
-
@Binyamin999 Can you share a screen recording? Or we can chat directly on https://gitter.im/seleniumbase/SeleniumBase
How do I share screen recording here?
Beta Was this translation helpful? Give feedback.
All reactions
-
@Binyamin999 CMD-SHIFT-5 on a Mac.
Beta Was this translation helpful? Give feedback.