Selenium Send Key node: Using flow variables for text to enter

I’m using the Selenium nodes to scrape hotel room pricing, sending the results as a weekly report to someone. I’d like to setup a workflow that allows me to send this report weekly. This requires that the start and end date fields in the site query be rolling depending on the week of reporting.

How can I make a table with start/end dates that feed into each Send key node to determine what text to type for the query?

Thanks

As a starter, here’s an example how to send the current date to an <input>:

For further steps, you’ll probably want to create two separate columns with the start and end date of the current week. From my understanding this is quite fiddly with KNIME. Me personally would probably simply use a Java snippet. Alternatively, if you want to do it entirely without code, I’d have a look at this node:

Extract the fields ‘year’ and ‘week of year’, concatenate them to a single string, and then parse these values again with:

This should give you a date at the beginning of the given week. For a date at the end of the week, simply add seven days with:

Selenium_Flow_Variable_Send_Keys.knwf (16.7 KB)

1 Like

Thank you!

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