This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ // An example configuration file.
2
+ exports . config = {
3
+ // Do not start a Selenium Standalone sever - only run this using chrome.
4
+ chromeOnly : true ,
5
+ chromeDriver : './selenium/chromedriver' ,
6
+
7
+ // Capabilities to be passed to the webdriver instance.
8
+ capabilities : {
9
+ 'browserName' : 'chrome'
10
+ } ,
11
+
12
+ // Spec patterns are relative to the current working directly when
13
+ // protractor is called.
14
+ specs : [ 'example_spec.js' ] ,
15
+
16
+ // Options to be passed to Jasmine-node.
17
+ jasmineNodeOpts : {
18
+ showColors : true ,
19
+ defaultTimeoutInterval : 30000
20
+ }
21
+ } ;
Original file line number Diff line number Diff line change @@ -201,6 +201,13 @@ var runJasmineTests = function() {
201
201
var runDeferred = webdriver . promise . defer ( ) ;
202
202
203
203
if ( config . chromeOnly ) {
204
+ if ( ! fs . existsSync ( config . chromeDriver ) ) {
205
+ if ( fs . existsSync ( config . chromeDriver + '.exe' ) ) {
206
+ config . chromeDriver += '.exe' ;
207
+ } else {
208
+ throw 'Could not find chromedriver at ' + config . chromeDriver ;
209
+ }
210
+ }
204
211
var service = new chrome . ServiceBuilder ( config . chromeDriver ) . build ( ) ;
205
212
driver = chrome . createDriver (
206
213
new webdriver . Capabilities ( config . capabilities ) , service ) ;
You can’t perform that action at this time.
0 commit comments