How to select a link which has the purpose of running JavaScript Code

Hey everybody,

I noticed a new problem while analyzing some websites.

In the first step I need to collect again all jobresults from a list. But how can I analyze the text of the singular vacancies when the links to the sites are  always "javascript:voidFunction();"??

 

so href= javascript:voidFunction();

Is there is possibilty?

thanks,

 

Vanessa

Simply follow the link using the Click node and then extract the current URL.

Philipp

Hey,

Sorry, but I don't understand how to do this.

all the links so the vacancies are  href= javascript:voidFunction(); so how can I use the click node?

 

First I use "Find elements" then the Click node to every single job?

Can you tell me the correct workflow please?

 

Thank you so much.

 

Vanessa

Hi Vanessa,

I assume the JavaScript on the mentioned link triggers any functionality which either loads a new page or changes/replaces the current page's content? That's exactly what the Selenium nodes are made for, you can act with your KNIME workflow like a person would interact with a browser. So, simply apply a "Click" node to perform the action and then apply whatever extraction/interaction logic you want to do.

"Find Elements" will extract any match, so if you extract multiple results, you might want to use the loop nodes, to perform your interaction step wise for each found result.

HTH,
Philipp

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