Automate form fill - Typing large number of characters

form-filling

#1

Hello,

I am working on a script that uses the csvread function to automate filling a form by entering information from each column. This works great, except for one section of the form where I am required to enter ~35K characters. When the script gets to the point where it reads data from this column, the script freezes without an error message.

I’ve tried using both the type and xtype commands. When I use the type command to enter the information, the script freezes. For xtype, the info is inputted into the form but the text begins to start becoming scrambled towards the end of the text that has to be inputted.

Is there a work around so that I can automatically enter a large # of characters into a form without the script freezing?

Thank you!


#2

I confirmed the “freeze” issue. Either the website or kantu freezes with the TYPE command. In the classic Selenium IDE the same issue seems to happen. The solution I found is to not use the TYPE command to enter the text, but to enter the text with copy & paste:

  • store | looong string | !clipboard store text in clipboard
  • xclick | id=box (set the focus in the box)
  • xtype | ${KEY_CTRL+KEY_V} paste text

Test macro:

{
  "Name": "lettercount_2",
  "CreationDate": "2019-3-1",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://www.lettercount.com/",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "name=charcount",
      "Value": "123"
    },
    {
      "Command": "store",
      "Target": "50,000 extra chars: xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 SOME CHARS REMOVED SO IT FITS IN THE FORUM, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 xyzab1234567890X, xyzab1234567890 xyzab1234567890 
      "Value": "!clipboard"
    },
    {
      "Command": "XClick",
      "Target": "name=charcount",
      "Value": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_CTRL+KEY_V}",
      "Value": ""
    },
    {
      "Command": "click",
      "Target": "/html/body/div[2]/div[3]/div[2]/form/div[2]/input[1]",
      "Value": ""
    }
  ]
}

Mac Shortcuts not working
#3

Thank you. To follow up, this solution solved the problem for me.

Much appreciated!


#4

Hi @admin

I have a question in your macro “lettercount_2” code i see this command

{
“Command”: “XType”,
“Target”: “${KEY_CTRL+KEY_V}”,
“Value”: “!clipboard”
},

What is the difference with

{
“Command”: “XType”,
“Target”: “${KEY_CTRL+KEY_V}”,
“Value”: “”
},

Sometimes in XType Value in see to add !clipboard sometimes no, when i paste a text from !clipboard in value what value i must add ? (!clipboard or “”) ?

In macro code i see value clipboard but in code previous not

* `store | looong string | !clipboard` store text in clipboard
* `xclick | id=box` (set the focus in the box)
* `xtype | ${KEY_CTRL+KEY_V}` paste text

Thanks, Have a nice day


#5

this is a typo. XType does not use the value field. So whatever is in there is simply ignored.

(I updated lettercount_2, thanks for the hint)


#6

Thanks @admin for the explanation.

Have a nice day