File tree 1 file changed +11
-10
lines changed
crates/cli/src/bin/wasm-bindgen-test-runner
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -126,16 +126,17 @@ pub fn run(
126
126
session : None ,
127
127
} ;
128
128
println ! ( "Try find `webdriver.json` for configure browser's capabilities:" ) ;
129
- let capabilities: Capabilities = match File :: open ( "webdriver.json" ) {
130
- Ok ( file) => {
131
- println ! ( "Ok" ) ;
132
- serde_json:: from_reader ( file)
133
- }
134
- Err ( _) => {
135
- println ! ( "Not found" ) ;
136
- Ok ( Capabilities :: new ( ) )
137
- }
138
- } ?;
129
+ let capabilities: Capabilities =
130
+ match File :: open ( std:: env:: var ( "WASM_BINDGEN_WEBDRIVER_JSON" ) . unwrap_or ( "webdriver.json" . to_string ( ) ) ) {
131
+ Ok ( file) => {
132
+ println ! ( "Ok" ) ;
133
+ serde_json:: from_reader ( file)
134
+ }
135
+ Err ( _) => {
136
+ println ! ( "Not found" ) ;
137
+ Ok ( Capabilities :: new ( ) )
138
+ }
139
+ } ?;
139
140
shell. status ( "Starting new webdriver session..." ) ;
140
141
// Allocate a new session with the webdriver protocol, and once we've done
141
142
// so schedule the browser to get closed with a call to `close_window`.
You can’t perform that action at this time.
0 commit comments