-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathselenium-frame.py
46 lines (31 loc) · 1.27 KB
/
selenium-frame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import unittest
from selenium import webdriver
class LiatrioBootcampLinkTest(unittest.TestCase):
def setUp(self):
# choose which webdriver to use
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
def test_bootcamp_link(self):
driver = self.driver
driver.get("https://devops-bootcamp.liatr.io")
# check we get expected page title
# find the link to Introduction to DevOps section at the bottom of the page
# check that we get the expected url
def tearDown(self):
self.driver.quit()
class LiatrioBootcampSidebarTest(unittest.TestCase):
def setUp(self):
# choose which webdriver to use
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(10)
def test_bootcamp_sidebar(self):
driver = self.driver
driver.get("https://devops-bootcamp.liatr.io")
# check that the sidebar is shown (HINT: check html body attributes)
# check that there is no CLOSE attribute on the body
# find the sidebar toggle and toggle it
# after toggling sidebar, check that it is closed
def tearDown(self):
self.driver.quit()
if __name__ == "__main__":
unittest.main()