File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 44import com .aventstack .chaintest .service .ChainPluginService ;
55import org .openqa .selenium .WebDriver ;
66import org .openqa .selenium .chrome .ChromeDriver ;
7+ import org .openqa .selenium .chrome .ChromeOptions ;
78import org .testng .ITestResult ;
89import org .testng .annotations .AfterMethod ;
910import org .testng .annotations .BeforeMethod ;
@@ -16,7 +17,12 @@ public class RootTest {
1617
1718 @ BeforeMethod
1819 public void setUp () {
19- driver = new ChromeDriver ();
20+ ChromeOptions options = new ChromeOptions ();
21+ options .addArguments ("--headless" ); // Enable headless mode
22+ options .addArguments ("--disable-gpu" ); // Disable GPU to avoid rendering issues
23+ options .addArguments ("--disable-extensions" ); // Disable extensions for stability
24+
25+ driver = new ChromeDriver (options );
2026 driver .manage ().timeouts ().implicitlyWait (Duration .ofSeconds (5 ));
2127 driver .manage ().timeouts ().pageLoadTimeout (Duration .ofSeconds (5 ));
2228 driver .manage ().window ().maximize ();
You can’t perform that action at this time.
0 commit comments