Error Handing in Selenium Node of Knime

Hi People,

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?

I tried googling also but didn’t worked.


Hi Ankit,

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:


1 Like

Thanks philipp,

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.

Does this help?

1 Like

I think I get what you are trying to say. I gave it a go on another workflow that I created.

The second collected result is showing me all the records. It’s not showing me the error. Do you know what I am doing wrong?

Hi qqilihq,

Could you please help.

Thanks in Advance.

Hi Ankit,

missed this post due to vacation season, sorry.

Please share a minimalized example workflow with your structure so that I can have a look at it locally!


No worries at all Philipp. I have emailed you the workflow.

1 Like

Thanks Ankit, confirming receipt. I’ll be in touch!


Hi Ankit,

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.

Hope this helps!

Best regards,

1 Like

Thanks Philipp. The workflow is now working fine. Thanks a ton for looking into this.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.