Selenium Nodes need to switch tab in Chrome browser

Hi all,

I’m developing a website scraper with KNIME Selenium nodes.

At a certain stage I click on a button and a new tab opens in Chrome (I cannot avoid opening a new tab). The WebDriver still reads from the first tab, but I need the WebDriver to read from the second tab.

I’ve found this example workflow from @qqilihq , which should be similar to my case, but somehow my WebDriver is broken after the switch to the next tab via a Java Snippet:

Although in the Chrome browser the tab is switched from 1st tab to 2nd tab, I cannot use the WebDriver with the next “Find Element” node, as it fails to read content from the WebDriver.

Anyone has any suggestions on how to solve this? Or maybe what causes this issue?
It would be great to have a Selenium node allowing to switch tabs.

Unfortunately due to security reasons I cannot upload the workflow, as it gets access to a secured portal.



Hi @RKrom,

I’ve just tested this locally with an example page which opens in a new tab and the workflow as shown above works fine for me - so it’s hard to come up with any advice without having access to the page (if you’re able to share it privately you can send it to me on mail@seleniumnodes.com)

One thing to try: Maybe only the “Outline” view in the Find Elements is affected and the functionality as-is still works fine. What happens if you use e.g. //title as XPath and run the node - do you get a result?

-Philipp