Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

How to insert Line break while filling web form?

Hello,


I am trying to fill a web form attached screenshot below which has a source code attached as a text file. I am using 'Populate text field' web action to do so. How can I add text with line break between the following two lines? 


"The Name of the Tender is: X
Brief Description of the Works: XYZ"


I am getting output as "The Name of the Tender is: X Brief Description of the Works: XYZ"


Simply pressing 'Enter' in populate text field doesn't work. How can I insert line break?


Thank You


Best Answer

Hello,


Your screenshot isn't available on this post... Please share it again.


The text area in the populate text field action will take all input values as text. Even if you pass a hotkey (enter), it'll consider it as a text value.


Have you tried sending an enter key using the 'send keys' action?


Alternatively, once the text field is in focus you can just send the entire text using 'send keys' action including the {enter} hotkey for newline.




1 person has this question

ADMIN
Answer

Hello,


Your screenshot isn't available on this post... Please share it again.


The text area in the populate text field action will take all input values as text. Even if you pass a hotkey (enter), it'll consider it as a text value.


Have you tried sending an enter key using the 'send keys' action?


Alternatively, once the text field is in focus you can just send the entire text using 'send keys' action including the {enter} hotkey for newline.




1 person likes this

Thanks for your kind reply.

Below is the screenshot of the form. 

Is there any shortcut way to insert a newline in the populate text field action? Using 'send keys' or focusing and entering text in the field adds a lot of work. Also I've another question. What to do about calendar fields (shown in anotrher screenshot)? They don't take text input rather a calendar pops up every time I click.

Form.JPG
(62.1 KB)
ADMIN

Hi,


In the text you want to send to the form, you can add an arbitrary character (like &,* etc.) at every point you need a new line. Then use the "Replace text" action on this text variable, and replace all occurrences of the arbitrary character with "\n". That way line breaks will be added to the text itself and this entire text can be sent in the populate text action as a variable.


Regarding the calendars, you'll need to use controls and selectors to pick specific elements in the popup and use click element/press button actions to click.




Login or Signup to post a comment