File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ public void setUp() {
2323 options .addArguments ("--disable-extensions" ); // Disable extensions for stability
2424
2525 driver = new ChromeDriver (options );
26- driver .manage ().timeouts ().implicitlyWait (Duration .ofSeconds (5 ));
27- driver .manage ().timeouts ().pageLoadTimeout (Duration .ofSeconds (5 ));
26+ driver .manage ().timeouts ().pageLoadTimeout (Duration .ofSeconds (60 ));
27+ driver .manage ().timeouts ().implicitlyWait (Duration .ofSeconds (10 ));
2828 driver .manage ().window ().maximize ();
2929 }
3030
@@ -39,9 +39,15 @@ public void attachScreenShot(final ITestResult result) {
3939 }
4040 }
4141
42- @ AfterMethod ( dependsOnMethods = "attachScreenShot" )
42+ @ AfterMethod
4343 public void tearDown () {
44- driver .quit ();
44+ if (driver != null ) {
45+ try {
46+ driver .quit ();
47+ } catch (Exception e ) {
48+ e .printStackTrace ();
49+ }
50+ }
4551 }
4652
4753}
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
33
4- <suite name =" Suite Name" parallel =" methods " thread-count =" 3" >
4+ <suite name =" Suite Name" parallel =" false " thread-count =" 3" >
55 <test name =" Test 1" >
66 <classes >
77 <class name =" reporting.TestUtils" />
You can’t perform that action at this time.
0 commit comments