-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsum.py
More file actions
24 lines (19 loc) · 709 Bytes
/
sum.py
File metadata and controls
24 lines (19 loc) · 709 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
import unittest
from selenium import webdriver
from webdriver_manager.firefox import DriverManager
class TestOne(unittest.TestCase):
def setUp(self):
self.driver = webdriver.PhantomJS()
self.driver.set_window_size(1120, 550)
def test_url(self):
self.driver.get("http://duckduckgo.com/")
self.driver.find_element_by_id(
'search_form_input_homepage').send_keys("realpython")
self.driver.find_element_by_id("search_button_homepage").click()
self.assertIn(
"https://duckduckgo.com/?q=realpython", self.driver.current_url
)
def tearDown(self):
self.driver.quit()
if __name__ == '__main__':
unittest.main()