@@ -142,25 +142,16 @@ export class PairingRowObject {
142142 clickCancel = false
143143 ) {
144144 if ( clickOnPairRow ) {
145- await this . pairRowForClick . evaluate ( ( el : HTMLElement ) => {
146- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
147- if ( input ) input . click ( ) ;
148- } ) ;
145+ await this . pairRowForClick . click ( { force : true } ) ;
149146 await this . page . waitForTimeout ( 500 ) ;
150147 if ( ( await this . pairRow . locator ( 'input' ) . isChecked ( ) ) !== pair ) {
151- await this . pairRowForClick . evaluate ( ( el : HTMLElement ) => {
152- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
153- if ( input ) input . click ( ) ;
154- } ) ;
148+ await this . pairRowForClick . click ( { force : true } ) ;
155149 await this . page . waitForTimeout ( 500 ) ;
156150 }
157151 } else {
158152 for ( let i = 0 ; i < this . pairCheckboxesForClick . length ; i ++ ) {
159153 if ( ( await this . pairCheckboxes [ i ] . locator ( 'input' ) . isChecked ( ) ) !== pair ) {
160- await this . pairCheckboxesForClick [ i ] . evaluate ( ( el : HTMLElement ) => {
161- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
162- if ( input ) input . click ( ) ;
163- } ) ;
154+ await this . pairCheckboxesForClick [ i ] . click ( { force : true } ) ;
164155 await this . page . waitForTimeout ( 500 ) ;
165156 }
166157 }
@@ -173,10 +164,7 @@ export class PairingRowObject {
173164 indexDeviceForPair : number ,
174165 clickCancel = false
175166 ) {
176- await this . pairCheckboxesForClick [ indexDeviceForPair ] . evaluate ( ( el : HTMLElement ) => {
177- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
178- if ( input ) input . click ( ) ;
179- } ) ;
167+ await this . pairCheckboxesForClick [ indexDeviceForPair ] . click ( { force : true } ) ;
180168 await this . page . waitForTimeout ( 1000 ) ;
181169 await this . pairingPage . savePairing ( clickCancel ) ;
182170 }
@@ -228,25 +216,16 @@ export class PairingColObject {
228216 clickCancel = false
229217 ) {
230218 if ( clickOnPairRow ) {
231- await this . pairColForClick . evaluate ( ( el : HTMLElement ) => {
232- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
233- if ( input ) input . click ( ) ;
234- } ) ;
219+ await this . pairColForClick . click ( { force : true } ) ;
235220 await this . page . waitForTimeout ( 500 ) ;
236221 if ( ( await this . pairCol . locator ( 'input' ) . isChecked ( ) ) !== pair ) {
237- await this . pairColForClick . evaluate ( ( el : HTMLElement ) => {
238- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
239- if ( input ) input . click ( ) ;
240- } ) ;
222+ await this . pairColForClick . click ( { force : true } ) ;
241223 await this . page . waitForTimeout ( 500 ) ;
242224 }
243225 } else {
244226 for ( let i = 0 ; i < this . pairCheckboxesForClick . length ; i ++ ) {
245227 if ( ( await this . pairCheckboxes [ i ] . locator ( 'input' ) . isChecked ( ) ) !== pair ) {
246- await this . pairCheckboxesForClick [ i ] . evaluate ( ( el : HTMLElement ) => {
247- const input = el . querySelector ( 'input[type="checkbox"]' ) as HTMLInputElement ;
248- if ( input ) input . click ( ) ;
249- } ) ;
228+ await this . pairCheckboxesForClick [ i ] . click ( { force : true } ) ;
250229 await this . page . waitForTimeout ( 500 ) ;
251230 }
252231 }
0 commit comments