File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 35
35
# Step - 3 : Run "driver.execute_script("smartui.takeScreenshot")" command wherever you need to take a screenshot
36
36
# Note: for additional capabilities navigate to https://www.lambdatest.com/support/docs/test-settings-options/
37
37
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 )
47
41
48
42
# """ You can write the test cases here """
49
43
def test_demo_site (self ):
@@ -88,7 +82,9 @@ def test_demo_site(self):
88
82
print ("Tests are run successfully!" )
89
83
else :
90
84
driver .execute_script ("lambda-status=failed" )
91
-
85
+ # tearDown runs after each test case
86
+ def tearDown (self ):
87
+ self .driver .quit ()
92
88
93
89
if __name__ == "__main__" :
94
90
unittest .main ()
You can’t perform that action at this time.
0 commit comments