Enter text is an action to simulate the behaviour 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:
- Enter a single keyword into the text box
- Enter multiple keywords into a search box
- Enter multiple lists of keywords to different text boxes correspondingly
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 what 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
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.
- Hover on the workflow and click the + add step button and select Loop
- Click Loop Item and switch the Loop Mode to Text List
- Click and then input the keywords (one keyword per line) on the pop-up box
- Confirm and Apply
- Click on the search box on the page in the built-in browser and select Enter text
- Leave the text box empty and click Confirm to create an Enter text step
- Select Use text in the loop to enter the text box then click Apply to save the settings.
- Click on the search box on the page and choose Click button
Go through the workflow step by step, you will find Octoparse can go to the page you need automatically, which means your configuration is successfully set up.
3. Enter multiple lists of keywords to different text boxes correspondingly
Select the first text box
Choose Enter text
Select the second text box
Click Enter text in bulk
Insert the username and password combination. Separate username and password with a ";", and one combination per line