@@ -11,18 +11,9 @@ import org.openqa.selenium.WebDriver
11
11
import org .openqa .selenium .JavascriptExecutor
12
12
import org .openqa .selenium .Platform
13
13
14
- final class SeleniumJSEnv (capabilities : Capabilities , config : SeleniumJSEnv .Config ) extends JSEnv {
14
+ final class SeleniumJSEnv (config : SeleniumJSEnv .Config ) extends JSEnv {
15
15
16
- def this (capabilities : Capabilities ) =
17
- this (capabilities, SeleniumJSEnv .Config ())
18
-
19
- private val augmentedCapabilities = {
20
- val x = new DesiredCapabilities (capabilities)
21
- // x.setJavascriptEnabled(true)
22
- x
23
- }
24
-
25
- val name : String = s " SeleniumJSEnv ( $capabilities) "
16
+ val name : String = s " SeleniumJSEnv ( $config) "
26
17
27
18
def start (input : Seq [Input ], runConfig : RunConfig ): JSRun =
28
19
SeleniumRun .start(newDriver _, input, config, runConfig)
@@ -32,7 +23,7 @@ final class SeleniumJSEnv(capabilities: Capabilities, config: SeleniumJSEnv.Conf
32
23
33
24
private def newDriver () = {
34
25
val driver : WebDriver =
35
- config.driverFactory(augmentedCapabilities )
26
+ config.driverFactory()
36
27
37
28
/* The first `asInstanceOf`s are a fail-fast for the second one, which
38
29
* scalac partially erases, so that we're sure right now that the last
@@ -60,7 +51,7 @@ object SeleniumJSEnv {
60
51
private def this () = this (
61
52
keepAlive = false ,
62
53
materialization = Config .Materialization .Temp ,
63
- driverFactory = caps => sys.error(" No driver factory configured" )
54
+ driverFactory = () => sys.error(" No driver factory configured" )
64
55
)
65
56
66
57
/** Materializes purely virtual files into a temp directory.
0 commit comments