Question: In my website there is provision for deleting say address entry from an account.
When I'm clicking on "Delete an address" link it asks me to confirm delete with pop up window which is having two buttons- "OK" and "Cancel". I got stuck here b'coz this pop window is not inspect-able by right clicking of a mouse,

Please let me know if anyone is having solution for this.
Thanks in advance

Answer: 
if its a normal javascript alertbox you can use below two commands to either click ok or cancel.

```

driver.switchTo().alert().accept()
driver.switchTo().alert().dismiss()

```
In my case following was worked:

```
driver.switchTo().alert().accept()

driver.switchTo().alert().dismiss()

```