@@ -222,7 +222,7 @@ async function buildProfile(template, extensions) {
222
222
dir = await io . tmpDir ( )
223
223
if ( template ) {
224
224
await io . copyDir (
225
- /** @type {string } */ ( template ) ,
225
+ /** @type {string } */ ( template ) ,
226
226
dir ,
227
227
/ ( p a r e n t \. l o c k | l o c k | \. p a r e n t l o c k ) /
228
228
)
@@ -393,6 +393,24 @@ class Options extends Capabilities {
393
393
}
394
394
throw TypeError ( 'binary must be a string path or Channel object' )
395
395
}
396
+
397
+ /**
398
+ * Enables Mobile start up features
399
+ *
400
+ * @param {string } androidPackage The package to use
401
+ * @return {!Options } A self reference
402
+ */
403
+ enableMobile ( androidPackage = "org.mozilla.firefox" , androidActivity = null , deviceSerial = null ) {
404
+ this . firefoxOptions_ ( ) . androidPackage = androidPackage
405
+
406
+ if ( androidActivity ) {
407
+ this . firefoxOptions_ ( ) . androidActivity = androidActivity
408
+ }
409
+ if ( deviceSerial ) {
410
+ this . firefoxOptions_ ( ) . deviceSerial = deviceSerial
411
+ }
412
+ return this
413
+ }
396
414
}
397
415
398
416
/**
@@ -432,11 +450,11 @@ function findGeckoDriver() {
432
450
if ( ! exe ) {
433
451
throw Error (
434
452
'The ' +
435
- GECKO_DRIVER_EXE +
436
- ' executable could not be found on the current ' +
437
- 'PATH. Please download the latest version from ' +
438
- 'https://github.com/mozilla/geckodriver/releases/ ' +
439
- 'and ensure it can be found on your PATH.'
453
+ GECKO_DRIVER_EXE +
454
+ ' executable could not be found on the current ' +
455
+ 'PATH. Please download the latest version from ' +
456
+ 'https://github.com/mozilla/geckodriver/releases/ ' +
457
+ 'and ensure it can be found on your PATH.'
440
458
)
441
459
}
442
460
return exe
@@ -457,8 +475,8 @@ function findInProgramFiles(file) {
457
475
return exists
458
476
? files [ 0 ]
459
477
: io . exists ( files [ 1 ] ) . then ( function ( exists ) {
460
- return exists ? files [ 1 ] : null
461
- } )
478
+ return exists ? files [ 1 ] : null
479
+ } )
462
480
} )
463
481
}
464
482
@@ -592,7 +610,7 @@ class Driver extends webdriver.WebDriver {
592
610
* implementation.
593
611
* @override
594
612
*/
595
- setFileDetector ( ) { }
613
+ setFileDetector ( ) { }
596
614
597
615
/**
598
616
* Get the context that is currently in effect.
0 commit comments