# Selenium 'click' behaviour doesn't mimic manual click outcome

**URL:** <https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751>\
**Category:** Community Extensions\
**Tags:** palladian-selenium\
**Created:** [May 26, 2024, 1:54pm UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751 "2024-05-26T13:54:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zovanti](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/z/c5a1d2/32.png) [@zovanti](https://forum.knime.com/u/zovanti)\
**Post date:** [May 26, 2024, 1:54pm UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751/1 "2024-05-26T13:54:52Z")

</div>

When using the Selenium ‘click’ node on buttons that generate a pop-up, I’m unable to achieve the same outcome as clicking the button manually. Whilst looking for possible answers I located the following page which replicates the issue:

> **[Why Selenium Clicks Fail - Lucidchart](https://www.lucidchart.com/techblog/2020/01/21/why-selenium-clicks-fail/)**
>
> At Lucid we pride ourselves in being on the cutting edge of E2E automation, and our automation engineers have compiled some different ways Selenium clicks fail and how to address each challenge.

The very simply workflow below navigates to the page, finds the ‘button’ element (found under the Heading ‘Basic button’) and clicks this but doesn’t generate the pop-up that could then potentially be handled by the Alert node.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/3/0378d2d7159edd8a9e9bf594b7dd444f2284c9db.png)

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [May 26, 2024, 5:38pm UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751/2 "2024-05-26T17:38:06Z")

</div>

Hello zovanti,

the [Click](https://nodepit.com/node/ws.palladian.nodes.selenium.click3.Click3NodeFactory) actually works just fine in this case. However Selenium - or the ChromeDriver to be precise - will per default automatically **dismiss** alerts. If you play the workflow and watch the browser, you will probably notice that the dialog pops up for a few milliseconds (or maybe not, if your computer is faster than mine).

You can override this behaviour using the `unhandledPromptBehavior` capability. The next release will contain this as pre-defined capability snippet to do just that. If you set the property to `ignore`, the dialog will remain open and you can individually interact using the [Alert](https://nodepit.com/node/ws.palladian.nodes.selenium.alert.AlertNodeFactory) node.

~~Afair Firefox will per default keep the dialog open (i.e. **not** auto-dismiss it).~~ [update] Apologies, this is obviously not (no longer) the case - you’ll also need to set the `unhandledPromptBehavior` in Firefox as outlined in previous paragraph.

HTH,  
Philipp

---

<div class="post-metadata">

**Author:** ![zovanti](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/z/c5a1d2/32.png) [@zovanti](https://forum.knime.com/u/zovanti)\
**Post date:** [May 26, 2024, 9:39pm UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751/3 "2024-05-26T21:39:38Z")

</div>

Phillip,

Thank you for highlighting this. Unfortunately, even with this capability added (refer to the screenshot below) I’m still not seeing the pop-up appear.

Regards,

Michael.

![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/c/ec0cd5b4dcc08824a13d1b1a74f440d0629a9681.png)

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [May 27, 2024, 6:10am UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751/4 "2024-05-27T06:10:38Z")

</div>

Thanks for getting back Michael - could you drop me a short email regarding this topic on [mail@seleniumnodes.com](mailto:mail@seleniumnodes.com) ?

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 25, 2024, 6:10am UTC](https://forum.knime.com/t/selenium-click-behaviour-doesnt-mimic-manual-click-outcome/79751/5 "2024-08-25T06:10:55Z")

</div>

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