- Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest_edge.py
More file actions
Latest commit
40 lines (30 loc) · 1017 Bytes
/
Copy pathtest_edge.py
File metadata and controls
40 lines (30 loc) · 1017 Bytes
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
importos
importunittest
importtime
fromseleniumimportwebdriver
classEdgeTestCase(unittest.TestCase):
@classmethod
defsetUpClass(cls):
dir=os.getenv('IEWebDriver')
driver=os.path.join(dir, 'IEDriverServer.exe')
cls.browser=webdriver.Ie(executable_path=driver)
@classmethod
deftearDownClass(cls):
cls.browser.quit()
deftestGoogle(self):
self.browser.get('http://www.google.com')
self.assertIn('Google', self.browser.title)
time.sleep(2)
deftestBing(self):
self.browser.get('http://www.bing.com')
self.assertIn('Bing', self.browser.title)
time.sleep(2)
deftestYahoo(self):
self.browser.get('http://www.yahoo.com')
self.assertIn('Yahoo', self.browser.title)
deftestOutlook(self):
self.browser.get('http://www.outlook.com')
self.assertIn('Outlook', self.browser.title)
time.sleep(2)
if__name__=='__main__':
unittest.main(verbosity=2)