I have made a workflow in the knime to extract some information using selenium nodes, however I am unable to handle errors as I am not sure which node to use. I tried using the error handling note but it didn’t worked.
Sometimes the variable flowing from the loop is not valid as I don’t have access to the page which causes it to fail. In such case I want the system to move on to the next link. Can anyone help me with this?
Also, if there a way I can store the error to review later may be in form of a table?
have you tried surrounding the inner loop (i.e. between the light blue nodes) with a Try/Catch combination? For your workflow, the following two would fit:
I did tried initially but failed probably, I was not sure if this is the one which I needed to you. Now, i am able to loop through the pages even if I have the error.
What can I use to collect the error in the a table format.
I tried variable to table row, but it seems to be capturing the current variable only.
Also, tried using table creator but no result of the failure’s on those.
I think you want to collect the errors from all iterations, correct? I would try as follows:
Add another input port to the Loop End node (for that, click on the three …) in the node. Then connect the Variable to Table Row to the second input port of the Loop End. This should give you at the second output port the collected errors from all iterations.
I think this is a good scenario which probably many Selenium Nodes users can face, thus I created a kind of didactic example how I’d recommend to do error handling with the nodes. You can get the commented workflow on my NodePit Space:
It uses the Try/Catch nodes for nodes which can potentially fail. Additionally, I ensure that all error messages from the iterations are kept and fed to the final result table; this required some hacking with a Variable to Table Row and Cross Joiner node.
The final table will have several columns, starting with various error reports (if an error occurs), and a “Source” column which is generated in case the execution succeeds.
It should be easy to adapt this to your specific requirements: Basically you’ll just need to change the input data, and replace the nodes within the red box between the Try and Catch nodes.