@@ -29,6 +29,7 @@ interface ExistsOptions {
2929
3030interface SetValueOptions {
3131 clearWithKeyboard ?: boolean ;
32+ clearCharByChar ?: boolean ;
3233 typeCharByChar ?: boolean ;
3334}
3435
@@ -183,15 +184,19 @@ export function TestSubjectsProvider({ getService }: FtrProviderContext) {
183184 options : SetValueOptions = { }
184185 ) : Promise < void > {
185186 return await retry . try ( async ( ) => {
186- const { clearWithKeyboard = false , typeCharByChar = false } = options ;
187+ const {
188+ clearWithKeyboard = false ,
189+ clearCharByChar = false ,
190+ typeCharByChar = false ,
191+ } = options ;
187192 log . debug ( `TestSubjects.setValue(${ selector } , ${ text } )` ) ;
188193 await this . click ( selector ) ;
189194 // in case the input element is actually a child of the testSubject, we
190195 // call clearValue() and type() on the element that is focused after
191196 // clicking on the testSubject
192197 const input = await find . activeElement ( ) ;
193198 if ( clearWithKeyboard === true ) {
194- await input . clearValueWithKeyboard ( ) ;
199+ await input . clearValueWithKeyboard ( { charByChar : clearCharByChar } ) ;
195200 } else {
196201 await input . clearValue ( ) ;
197202 }
0 commit comments