Commit 428c901d authored by JunHyung An's avatar JunHyung An
Browse files

Detect linux platform

parent 775418f5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException, NoAlertPresentException, TimeoutException
import unittest, time
import threading  # Import the threading module
import sys # Import the sys module for OS detection

# Import for Explicit Waits
from selenium.webdriver.support.ui import WebDriverWait
@@ -307,8 +308,9 @@ class MultipleTest(unittest.TestCase):
        options.binary_location = self.binary_location

        # Linux Only
        # options.add_argument("--no-sandbox")
        # options.add_argument("--disable-dev-shm-usage")
        if sys.platform.startswith('linux'): # Check if the operating system is Linux
            options.add_argument("--no-sandbox")
            options.add_argument("--disable-dev-shm-usage")

        driver = webdriver.Chrome(executable_path=self.webdriver_path, options=options)
        driver.implicitly_wait(10)  # Common implicit wait for this driver