Enter text
Updated over a week ago

Enter text is an action to simulate the behavior of entering text on a web page. For example, we can input login credentials on the page to scrape the data behind a login. Also, if we have a list of keywords to search on websites, we can use this feature to input the keywords into the search box.

In this tutorial, we'll be learning how to use the Enter text feature to input text(s) in different scenarios.


1. Enter a single keyword into the text box

Entering a text or keyword in Octoparse is easy. With the built-in browser, you can interact with the web page by simply pointing and clicking, just like you do using any normal browser.

  • Click on the login box on the page and select Enter text in the Tips panel

  • Input text and then Confirm

You will see an Enter Text step being created in the workflow

mceclip0.png

2. Enter multiple keywords into a search box

If you have a series of pre-defined and specific text values, you can add them to the "Text list" to create a loop search action. Octoparse will automatically enter every word in the list into the search box, one word at a time.

  • Click on the search box and choose Enter Text

  • Click Enter text in loop

  • Input a list of keywords, one search term per line

  • Click Confirm to save

Loop Item will be created in the workflow.

Note:

The text list should not exceed 10K lines.


3. Enter two keywords into different text boxes

If there are multiple text boxes and you want to input different keywords to them accordingly, for example, input username and password to a website, you can follow the steps below.

  • Select the first text box

  • Choose Enter text

  • Select the second text box

  • Input the username/password to Textbox 1/Textbox 2

  • Click Confirm to save


4. Enter multiple lists of keywords into different text boxes correspondingly

If you have multiple lists of keywords and want to input them into different text boxes correspondingly, Octoparse can also help you with that. For example, you want to log in to a website with different username and password combinations to get different information.

  • Select the first text box

  • Choose Enter text

  • Select the second text box

  • Click Enter text in loop

  • Insert the username and password combination

  • Separate username and password with a ";", and input one combination per line

insert_password_username.png

Note: If you have more than two lists, you can continue to select the third or more text boxes. When inserting the text, just use “;” to separate the three or more texts like string1;string2;string3...

Did this answer your question?