Skip to content

Commit 7e51c99

Browse files
authored
Merge pull request #125 from gzm0/quit-not-close
Fix #124: Call quit not close on WebDriver for cleanup
2 parents 5372e7f + 0b99685 commit 7e51c99

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

seleniumJSEnv/src/main/scala/org/scalajs/jsenv/selenium/SeleniumRun.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private[selenium] object SeleniumRun {
162162
}
163163

164164
private def maybeCleanupDriver(d: WebDriver, config: SeleniumJSEnv.Config) =
165-
if (!config.keepAlive) d.close()
165+
if (!config.keepAlive) d.quit()
166166

167167
private def htmlPage(fullInput: Seq[Input], materializer: FileMaterializer): String = {
168168
val tags = fullInput.map {

seleniumJSEnv/src/test/scala/org/scalajs/jsenv/selenium/KeepAliveTest.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class KeepAliveTest {
1818
private final class MockWebDriver extends WebDriver with JavascriptExecutor {
1919
var closed = false
2020

21-
def close(): Unit = closed = true
2221
def quit(): Unit = closed = true
2322

2423
def executeScript(code: String, args: Object*): Object =
@@ -36,6 +35,8 @@ class KeepAliveTest {
3635

3736
// Stuff we won't need.
3837

38+
def close(): Unit = ???
39+
3940
def executeAsyncScript(code: String, args: Object*): Object = ???
4041

4142
def findElement(x1: By): WebElement = ???

0 commit comments

Comments
 (0)