It is common that a data field may appear at different places on different pages. Therefore, it helps to have a backup XPath in case the primary XPath fails to locate the page element. A backup XPath is also known as an "alternative XPath" in Octoparse.
Set up an alternative XPath
- Click on icon for the data field of interest
- Select Customize XPath from the drop-down list
- Tick the option for Try alternative XPath and input the alternative XPath directly into the box
So now when Octoparse cannot find the target data field using the primary XPath, it will go on to use the alternative XPath to match the desired data field.
Please note that relative XPath and backup XPath cannot be applied at the same time, meaning if relative XPath is used to locate the data field, then the backup XPath will be disabled.