You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier, and more robust! Download and upgrade here if you haven't already done so!
The Open in a new tab feature in Octoparse is the same as the Open link in new tab function in a browser.
It is one of the most frequently used features while building a crawler. Without this feature, we can't click through all the pages to extract the data. In this tutorial, we are going to learn how and when to use this feature to get to the page that has the data we need.
Where is the "Open in a new tab" option
The Open in a new tab feature is in the settings of Click Item action. You can click on a Click Item action and click on Options. Ticking the box in front of it will activate the feature. Click Apply to save.
When should I apply this option?
Octoparse will open a link in a new tab if the Open in a new tab feature is ticked, so the new page won't cover the previous page, and Octoparse can get back to the previous page to open other links. You can use this feature if you don't want the new page to cover the previous one. Just think about how you would use the "Open link in new tab" when browsing a website. We've listed two common cases using the feature below:
1. When you need to loop click through a list of items
For example, when you need to click through a list of product links to extract data on the product detail pages from an e-commerce website, you need to check the Open in a new tab option. If you don't check it, Octoparse won't be able to return to the listing page and enter other products' detail pages.
2. When you need to loop input a list of keywords to search for the data
For example, when you need to input keywords to search for some items on an e-commerce website, the Open in a new tab option must be checked for the Click Item that clicks the search button. Otherwise, Octoparse won't be able to enter a new keyword in case the search result page does not contain the search box where we need to input the next keyword.
Tips: 1. Octoparse usually automatically selects the "Open in a new tab" when generating Click Items. But in case you encounter the following issue, you may need to check if this option is ticked:
When should I not apply this feature?
We should not use the Open in a new tab feature when the page loads the information with AJAX since pages with AJAX cannot open a new tab but directly update information on the current page.
If you use the Open in a new tab feature for the AJAX loading page, you might get a blank page when extracting data. In this case, just uncheck the Open in a new tab option for the Click Item, and you will get the normal web page.