Close the browser with a blank file warning when uploading files with Selenium

#1

Hi Phillip @qqilihq
If my data file is hollow in Selenium-running workflows, the send button doesn’t occur to transfer the file. I want to close the web browser automatically when the send button (with condition) does not occur.

I’m trying to edit my workflow by making use of the mail flow when the send button can’t find the search element. But I could not fulfill the element condition?

Where is the missing or the error?

condition does not work / could not find the necessary rule

if the file is empty or does not transfer / send button, I want the web browser to turn off. I want this

0 Likes

#2

As you see, the corresponding Find Elements returns an empty table, when no element (i.e. the “Send” button in you case) is found (node has the yellow warning sign).

So, a Try node will not help you here. Instead you can use an Empty Table Switch node to create two branches – one in case the button was found, and one in case it was not found. In those branches, just execute the appropriate functionality, and join both branches with an End If node at the end:

1 Like

#3

Hi; Philiip @qqilihq

I tried it that way, but it didn’t. Was it wrong?

0 Likes

#4

The final Quit WebDriver currently will not work, as the input table is empty and thus the browser will remain open. You can circumvent this by connecting the Quit WebDriver with the very beginning of the workflow (e.g. directly to the Start WebDriver node), and then add an additional Flow Variable connection from the End If to the Quit WebDriver which will serve as synchronization.

Does this make sense?

[edit] Please check this post which describes the idea of using Flow Variables as synchronization utility: Selenium Nodes: All Loop Iterations Repeat First Page Content

2 Likes

#5

Thanks for the solution worked my sample. The alternative allowed me to make it easier.:tada:

0 Likes

closed #6

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

0 Likes