Skip to content

Commit dd81996

Browse files
authored
Update lambdatest.py
1 parent 1ef38ce commit dd81996

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lambdatest.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@
3535
# Step - 3 : Run "driver.execute_script("smartui.takeScreenshot")" command wherever you need to take a screenshot
3636
# Note: for additional capabilities navigate to https://www.lambdatest.com/support/docs/test-settings-options/
3737

38-
driver = webdriver.Remote(
39-
command_executor="http://{}:{}@hub.lambdatest.com/wd/hub".format(
40-
username, access_key),options=options)
41-
42-
# tearDown runs after each test case
43-
44-
45-
def tearDown(self):
46-
self.driver.quit()
38+
class FirstSampleTest(unittest.TestCase):
39+
def setUp(self):
40+
driver = webdriver.Remote(command_executor="http://{}:{}@hub.lambdatest.com/wd/hub".format(username, access_key),options=options)
4741

4842
# """ You can write the test cases here """
4943
def test_demo_site(self):
@@ -88,7 +82,9 @@ def test_demo_site(self):
8882
print("Tests are run successfully!")
8983
else:
9084
driver.execute_script("lambda-status=failed")
91-
85+
# tearDown runs after each test case
86+
def tearDown(self):
87+
self.driver.quit()
9288

9389
if __name__ == "__main__":
9490
unittest.main()

0 commit comments

Comments
 (0)