Skip to content

Commit

Permalink
fix: github workflow test issues fixed by adding headless option
Browse files Browse the repository at this point in the history
  • Loading branch information
RawanMostafa08 committed Oct 20, 2024
1 parent e70cdfc commit cf45251
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SecretNote/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from django.conf import settings
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import NoSuchElementException
import random
import string
Expand All @@ -28,7 +28,9 @@ class EndToEndTests(StaticLiveServerTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
options = Options()
options.add_argument("--headless")
cls.driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)
cls.driver.implicitly_wait(1)

@classmethod
Expand Down

0 comments on commit cf45251

Please sign in to comment.