@@ -122,7 +122,7 @@ export class AppiumDriver {
122
122
*/
123
123
public async findElementByXPath ( xPath : string , waitForElement : number = this . defaultWaitTime ) {
124
124
const searchM = "waitForElementByXPath" ;
125
- return await new UIElement ( await this . _driver . waitForElementByXPath ( xPath , waitForElement ) , this . _driver , this . _wd , this . _webio , searchM , xPath ) ;
125
+ return await new UIElement ( await this . _driver . waitForElementByXPath ( xPath , waitForElement ) , this . _driver , this . _wd , this . _webio , this . _args , searchM , xPath ) ;
126
126
}
127
127
128
128
/**
@@ -163,7 +163,7 @@ export class AppiumDriver {
163
163
* @param waitForElement
164
164
*/
165
165
public async findElementByClassName ( className : string , waitForElement : number = this . defaultWaitTime ) {
166
- return new UIElement ( await this . _driver . waitForElementByClassName ( className , waitForElement ) , this . _driver , this . _wd , this . _webio , "waitForElementByClassName" , className ) ;
166
+ return new UIElement ( await this . _driver . waitForElementByClassName ( className , waitForElement ) , this . _driver , this . _wd , this . _webio , this . _args , "waitForElementByClassName" , className ) ;
167
167
}
168
168
169
169
/**
@@ -182,7 +182,7 @@ export class AppiumDriver {
182
182
* @param waitForElement
183
183
*/
184
184
public async findElementByAccessibilityId ( id , waitForElement : number = this . defaultWaitTime ) {
185
- return new UIElement ( await this . _driver . waitForElementByAccessibilityId ( id , waitForElement ) , this . _driver , this . _wd , this . _webio , "waitForElementByAccessibilityId" , id ) ;
185
+ return new UIElement ( await this . _driver . waitForElementByAccessibilityId ( id , waitForElement ) , this . _driver , this . _wd , this . _webio , this . _args , "waitForElementByAccessibilityId" , id ) ;
186
186
}
187
187
188
188
/**
@@ -271,10 +271,10 @@ export class AppiumDriver {
271
271
}
272
272
273
273
public async compareElement ( element : UIElement , imageName : string , ) {
274
- return await this . compareRectangles ( await element . getRectangle ( ) , imageName ) ;
274
+ return await this . compareRectangle ( await element . getActualRectangle ( ) , imageName ) ;
275
275
}
276
276
277
- public async compareRectangles ( rect : IRectangle , imageName : string , timeOutSeconds : number = 3 , tollerance : number = 0.01 ) {
277
+ public async compareRectangle ( rect : IRectangle , imageName : string , timeOutSeconds : number = 3 , tollerance : number = 0.01 ) {
278
278
return await this . compare ( imageName , timeOutSeconds , tollerance , rect ) ;
279
279
}
280
280
@@ -452,7 +452,7 @@ export class AppiumDriver {
452
452
return arrayOfUIElements ;
453
453
}
454
454
array . forEach ( async element => {
455
- arrayOfUIElements . push ( new UIElement ( await element , this . _driver , this . _wd , this . _webio , searchM , args , i ) ) ;
455
+ arrayOfUIElements . push ( new UIElement ( await element , this . _driver , this . _wd , this . _webio , this . _args , searchM , args , i ) ) ;
456
456
i ++ ;
457
457
} ) ;
458
458
0 commit comments