@@ -283,7 +283,7 @@ export default myEformsPage;
283283class MyEformsRowObject {
284284 constructor ( ) {
285285 }
286-
286+ currentPosition : number ;
287287 element : WebdriverIO . Element ;
288288 id : number ;
289289 createdAt : Date ;
@@ -298,33 +298,33 @@ class MyEformsRowObject {
298298 goVisualEditorBtn : WebdriverIO . Element ;
299299
300300 async getRow ( rowNum : number ) {
301- const currentPosition = rowNum - 1 ;
302- this . element = ( await $$ ( '#mainPageEFormsTableBody tr.mat-mdc-row' ) ) [ currentPosition ] ;
303- this . id = + ( await ( await $$ ( '#eform-id-' + ( currentPosition ) ) ) [ 0 ] . getText ( ) ) ;
301+ this . currentPosition = rowNum - 1 ;
302+ this . element = ( await $$ ( '#mainPageEFormsTableBody tr.mat-mdc-row' ) ) [ this . currentPosition ] ;
303+ this . id = + ( await ( await $$ ( '#eform-id-' + ( this . currentPosition ) ) ) [ 0 ] . getText ( ) ) ;
304304 try {
305- const val = ( await $$ ( '#eform-created-at-' + ( currentPosition ) ) ) [ 0 ] ;
305+ const val = ( await $$ ( '#eform-created-at-' + ( this . currentPosition ) ) ) [ 0 ] ;
306306 this . createdAt = new Date ( await val . getText ( ) ) ;
307307 } catch ( e ) {
308308 }
309309 try {
310- const val = ( await $$ ( '#eform-label-' + ( currentPosition ) ) ) [ 0 ] ;
310+ const val = ( await $$ ( '#eform-label-' + ( this . currentPosition ) ) ) [ 0 ] ;
311311 this . eFormName = await val . getText ( ) ;
312312 } catch ( e ) {
313313 }
314- const val2 = ( await $$ ( `#mainPageEFormsTableBody tr.mat-mdc-row` ) ) [ currentPosition ] ;
314+ const val2 = ( await $$ ( `#mainPageEFormsTableBody tr.mat-mdc-row` ) ) [ this . currentPosition ] ;
315315 this . tags = await this . element . $$ ( '.mat-column-tags mat-chip span span span.mat-mdc-chip-action-label' ) ;
316316 // this.pairs = await $$(`//*[@id="mainPageEFormsTableBody"]/tr[${rowNum}]//*[@id ="eform-pair"]`);
317- this . editTagsBtn = ( await $$ ( '#eform-edit-btn-' + ( currentPosition ) ) ) [ 0 ] ;
317+ this . editTagsBtn = ( await $$ ( '#eform-edit-btn-' + ( this . currentPosition ) ) ) [ 0 ] ;
318318 this . editPairEformBtn = await ( await $$ ( `#mainPageEFormsTableBody tr.mat-mdc-row` ) ) [
319- currentPosition
320- ] . $ ( '#eform-pairing-btn-' + ( currentPosition ) ) ;
319+ this . currentPosition
320+ ] . $ ( '#eform-pairing-btn-' + ( this . currentPosition ) ) ;
321321 this . addPairEformBtn = await ( await $$ ( `#mainPageEFormsTableBody tr.mat-mdc-row` ) ) [
322- currentPosition
323- ] . $ ( '#eform-add-btn-' + ( currentPosition ) ) ;
324- this . editColumnsBtn = await $ ( '#edit-columns-btn-' + ( currentPosition ) ) ;
325- this . deleteBtn = await $ ( '#delete-eform-btn-' + ( currentPosition ) ) ;
326- this . uploadZipArchiveBtn = await $ ( '#upload-zip-btn-' + ( currentPosition ) ) ;
327- this . goVisualEditorBtn = await $ ( '#edit-eform-btn-' + ( currentPosition ) ) ;
322+ this . currentPosition
323+ ] . $ ( '#eform-add-btn-' + ( this . currentPosition ) ) ;
324+ this . editColumnsBtn = await $ ( '#edit-columns-btn-' + ( this . currentPosition ) ) ;
325+ this . deleteBtn = await $ ( '#delete-eform-btn-' + ( this . currentPosition ) ) ;
326+ this . uploadZipArchiveBtn = await $ ( '#upload-zip-btn-' + ( this . currentPosition ) ) ;
327+ this . goVisualEditorBtn = await $ ( '#edit-eform-btn-' + ( this . currentPosition ) ) ;
328328 return this ;
329329 }
330330
@@ -345,7 +345,7 @@ class MyEformsRowObject {
345345
346346 private async clickActionsMenu ( ) {
347347 await browser . pause ( 1000 ) ;
348- await ( await $$ ( '#actionMenu' ) ) [ 0 ] . click ( ) ;
348+ await ( await $$ ( '#actionMenu' ) ) [ this . currentPosition ] . click ( ) ;
349349 await browser . pause ( 1000 ) ;
350350 }
351351
0 commit comments