@@ -206,17 +206,15 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider
206206
207207 async getFieldsTabCount ( ) {
208208 return retry . try ( async ( ) => {
209- const indexedFieldsTab = await find . byCssSelector ( '#indexedFields .euiTab__content' ) ;
210- const text = await indexedFieldsTab . getVisibleText ( ) ;
211- return text . split ( / [ ( ) ] / ) [ 1 ] ;
209+ const text = await testSubjects . getVisibleText ( 'tab-indexedFields' ) ;
210+ return text . split ( ' ' ) [ 1 ] . replace ( / \( ( .* ) \) / , '$1' ) ;
212211 } ) ;
213212 }
214213
215214 async getScriptedFieldsTabCount ( ) {
216215 return await retry . try ( async ( ) => {
217- const scriptedFieldsTab = await find . byCssSelector ( '#scriptedFields .euiTab__content' ) ;
218- const text = await scriptedFieldsTab . getVisibleText ( ) ;
219- return text . split ( / [ ( ) ] / ) [ 1 ] ;
216+ const text = await testSubjects . getVisibleText ( 'tab-scriptedFields' ) ;
217+ return text . split ( ' ' ) [ 2 ] . replace ( / \( ( .* ) \) / , '$1' ) ;
220218 } ) ;
221219 }
222220
@@ -431,17 +429,17 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider
431429
432430 async clickFieldsTab ( ) {
433431 log . debug ( 'click Fields tab' ) ;
434- await find . clickByCssSelector ( '# indexedFields') ;
432+ await testSubjects . click ( 'tab- indexedFields') ;
435433 }
436434
437435 async clickScriptedFieldsTab ( ) {
438436 log . debug ( 'click Scripted Fields tab' ) ;
439- await find . clickByCssSelector ( '# scriptedFields') ;
437+ await testSubjects . click ( 'tab- scriptedFields') ;
440438 }
441439
442440 async clickSourceFiltersTab ( ) {
443441 log . debug ( 'click Source Filters tab' ) ;
444- await find . clickByCssSelector ( '# sourceFilters') ;
442+ await testSubjects . click ( 'tab- sourceFilters') ;
445443 }
446444
447445 async editScriptedField ( name : string ) {
0 commit comments