This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " selenium-appium" ,
3- "version" : " 0.0.3 " ,
3+ "version" : " 0.0.4 " ,
44 "description" : " A brdige to make selenium-webdriver to drive appium to do native app testing" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ interface IAppiumWaitUntilFound {
1616 getByclassName ( className : string , timeout ?: number , message ?: string ) : WebElementPromise ;
1717}
1818
19- export interface IAppiumDriver extends IAppiumWaitUntilFound
20- {
19+ export interface IAppiumDriver extends IAppiumWaitUntilFound {
2120 start ( ) : Promise < void > ;
2221 stop ( ) : Promise < void > ;
2322 restart ( ) : Promise < void > ;
@@ -67,22 +66,22 @@ class AppiumDriver implements IAppiumDriver {
6766 }
6867
6968 start ( ) : Promise < void > {
70- return new Promise < void > ( resolve => {
69+ return new Promise < void > ( ( resolve , reject ) => {
7170 new Builder ( )
7271 . usingServer ( this . url_ )
7372 . withCapabilities ( this . capabilities_ )
7473 . build ( )
7574 . then ( driver => { this . webDriver = driver ; resolve ( ) ; } )
76- . catch ( e => { this . error_ = e ; throw e ; } ) ;
75+ . catch ( e => { this . error_ = e ; reject ( e ) } ) ;
7776 } ) ;
7877 }
7978
8079 stop ( ) : Promise < void > {
81- return new Promise < void > ( resolve => {
80+ return new Promise < void > ( ( resolve , reject ) => {
8281 this . webDriver && this . webDriver
8382 . quit ( )
8483 . then ( ( ) => resolve ( ) )
85- . catch ( e => { this . error_ = e ; throw e } ) ;
84+ . catch ( e => { this . error_ = e ; reject ( e ) } ) ;
8685 resolve ( ) ;
8786 } ) ;
8887 }
You can’t perform that action at this time.
0 commit comments