Scripting - Enter value into a text box and hit tab

Hi,

In my use case, i need to enter data into a text box and hit “Next” button to move to next page.

I am able to enter data into text box using execAndWait & setValue. But I am not able to click on “Next” since it is in disable state. Application is not considering it as script entered the value and validated.

Option #1:
execAndWait document.querySelector().value = “”;

Option #2:
setValue id=

How can I enter the data and hit a tab button or submit the data to get it validated to move further steps?

Thanks,
Krishna

Worked with UI Developer and got solution for this… Text box value get it validated automatically on click tab button or ‘on control moves to next element’.

execAndWait $(‘#<Element_ID>’).find(‘:input’).each(function() {if($(this).prop(‘type’) == ‘text’){$(this).attr(‘value’, “”).change();}});

Hopefully this solution works specific to application, same may not work for other applications.