Current time: 03-09-2021, 02:45 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting - Enter value into a text box and hit tab
11-27-2020, 02:29 PM (This post was last modified: 12-27-2020 12:10 PM by krishna.web.)
Post: #1
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(<JS Path>).value = "<value>";

Option #2:
setValue id=<element> <value>

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
Find all posts by this user
Quote this message in a reply
12-27-2020, 12:11 PM
Post: #2
RE: Scripting - Enter value into a text box and hit tab
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', "<value>").change();}});

Hopefully this solution works specific to application, same may not work for other applications.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)