test_system.py 864 Bytes
Newer Older
Andreas Jensen Jonassen's avatar
Andreas Jensen Jonassen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.expected_conditions import presence_of_element_located

class system_testing(unittest.TestCase): 
    # initialization of webdriver 
    def setUp(self): 
        chrome_options = webdriver.ChromeOptions()
        chrome_options.add_argument('--no-sandbox')
        chrome_options.add_argument('--window-size=1420,1080')
        chrome_options.add_argument('--headless')
        chrome_options.add_argument('--disable-gpu')
        self.driver = webdriver.Chrome(chrome_options=chrome_options)

    def test(self):
        self.driver.get("http://localhost:3000")
        print("hi")

    def tearDown(self): 
        self.driver.close()