Hi;
do you have a sample workflow with selenium yada knime in a website with authentication? I was a beginner, so I could not figure it out.
I am very happy if you send a sample workflow.
I am trying to login to a web site with username and password, then transfer the data from the json table to the csv file.
login with both username and password, I need to transfer the csv to the next table with the option I chose.
A simple example that will provide insight is very useful.
Thank you
Hi,
please have a look at the âFacebookâ workflow on the examples page:
Best,
Philipp
Hello there;
I do not understand where I am doing wrong. I want to print the username and password for login but it does not. XPath is wrong, if you are a help
Hi,
please post your WF if you want me to have a look.
â Philipp
The reason is, that the content in the login window is shown within an <iframe>
, and Find Elements will not operate into the <iframe>
:

What youâll have to do after opening the login window:
-
Get the <iframe>
using a Find Elements node (use e.g. an ID query iframe_login
, or XPath //*[@id='iframe_login']
)
-
Use the Frame node, check âWebElementâ and select the <iframe>
column from previous step
-
Continue with your existing workflow
In case you need to âescapeâ from the <iframe>
later, you can use another Frame node with the option âBack to parent frameâ or âDefault contentâ.
Does that help?
Could you send me a sample workflow. Iâve done different experiments for the same url, but Iâm a beginner and I can not figure out the exact way. A sample flow will help me a lot.
Hereâs the outlined workflow with the <iframe>
handling as described.
â Philipp
Selenium_iframe_procurementmap.intracen.org.knwf (15.8 KB)
@umutcankurt Any feedback?
Hello there;
I had a little bit of work and I had a chance to try new. Unfortunately, the password and username are not entered and only remain on the login screen.
How many times have I tried it? I do not understand where the problem is
We can provide password and username to google chorme page which comes to us with automatic form filling. ? Would not it be easier to login. Do we simplify the work steps?
Hi there!
I do not really understand this one. Can you please go in detail? What do you mean with âare not entered and only remain on the login screenâ? With the version of the WF posted above, your browser window should show the following after execution:
It should also enter YOUR_PASSWORD
in the âPasswordâ field, but this will be cleared when clicking the submit button. Now you should simply be able to update the flow variables with your valid credentials: Right click on the WF in the âKNIME Explorerâ, open menu âWorkflow variable administrationâ):

With correct credentials, the login should work. (I didnât try this, b/c I obviously have no account on the mentioned site)
No. Auto-completion will not be available in the Chrome instance launched via Selenium.
The procedure is quite similar to the one with the login âŠ:
- Locate the input field with a Find Elements node
- Enter text into the field with a Send Keys node
- In case the website requires that you select an entry from the menu, use a Find Elements node again to locate the corresponding menu entry
- Click on the entry using the Click node
As this is probably involves asynchronous logic, youâll probably have to use the Find Elementâs âWaitâ functionality, or add an explicit Wait node in between.
â Philipp
Thank you very much for all your support. Wait for the solution by adding the node. but compared to an unpredictable change.
XPath is now the correct path for the tentative information, but because the tentative numbers are constantly changing, XPath is now the correct path, but the tender-dialog-43 ⊠in the XPath is changed
Sample
// * [@ id = âtender-dialog-436349804â] / div [2] / div / div [1] / p / a
// * [@ id = âtender-dialog-436209111â] / div [2] / div / div [1] / p / a
I think Iâm going to find a solution to this
Iâd recommend to use XPathâs contains
function to select the dialog. This might do the trick:
//*[contains(@id, 'tender-dialog-')]
Above is a very simplified solution, and might also match too much, depending on the page structure. For more sophisticated strategies, have a look at this Stack Overflow question, e.g.
â Philipp
Thank you, Philipp; I work exactly as I want for all the contributions and supports. 
1 Like