Skip to content

Commit 64d46ad

Browse files
committed
Update TestCase.php
1 parent 0d08a1a commit 64d46ad

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/TestCase.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,4 @@ protected function driver(): RemoteWebDriver
8080
)
8181
);
8282
}
83-
84-
/**
85-
* Capture failure screenshots for each browser.
86-
*
87-
* Overrides the default to dismiss any open JS dialog before attempting a screenshot.
88-
* Without this, an open alert causes UnexpectedAlertOpenException which overwrites the
89-
* real assertion failure, making the test appear to fail for a different reason.
90-
*/
91-
protected function captureFailuresFor($browsers): void
92-
{
93-
$browsers->each(function ($browser) {
94-
try {
95-
$browser->driver->switchTo()->alert()->dismiss();
96-
} catch (NoAlertOpenException $e) {
97-
// No dialog open — nothing to dismiss.
98-
}
99-
});
100-
101-
parent::captureFailuresFor($browsers);
102-
}
10383
}

0 commit comments

Comments
 (0)