# How to handle Modal dialog

**URL:** <https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257>\
**Category:** SeleniumLibrary\
**Created:** [28 January 2021 09:12 UTC](https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257 "2021-01-28T09:12:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![axeyama](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@axeyama](https://forum.robotframework.org/u/axeyama)\
**Post date:** [28 January 2021 09:12 UTC](https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257/1 "2021-01-28T09:12:33Z")

</div>

How to handle Modal dialog using selenium library.

---

<div class="post-metadata">

**Author:** ![andremetelo](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@andremetelo](https://forum.robotframework.org/u/andremetelo)\
**Post date:** [28 January 2021 12:18 UTC](https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257/2 "2021-01-28T12:18:44Z")

</div>

I have been using:

Handle Alert Accept

you have other options to choose different buttons in the dialog, but usually I just hit warning messages that pop-up as an alert.

---

<div class="post-metadata">

**Author:** ![robottester](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@robottester](https://forum.robotframework.org/u/robottester)\
**Post date:** [15 February 2022 04:04 UTC](https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257/3 "2022-02-15T04:04:11Z")

</div>

> [@andremetelo](#):
>
> tions to choose different buttons in the dialog, but usually I just hit warning messages that pop-up as an alert.

How to solve this issue? I am also facing same issue and need some inputs…

---

<div class="post-metadata">

**Author:** ![valentijnpeters](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/valentijnpeters/32/828_2.png) [@valentijnpeters](https://forum.robotframework.org/u/valentijnpeters)\
**Post date:** [15 February 2022 12:55 UTC](https://forum.robotframework.org/t/how-to-handle-modal-dialog/1257/4 "2022-02-15T12:55:50Z")

</div>

try this:

```
{element1} Get Webelement //xpath
Execute Javascript arguments[0]click(); ARGUMENTS ${element1}
```
