How to Click on ok/cancel Button in an alert

3,835 views
Skip to first unread message

Sandeep V Mohan

unread,
Mar 12, 2014, 4:39:31 PM3/12/14
to robotframe...@googlegroups.com
Hi Team,

When I delete a record, I get alert  "Are you sure" with Ok and Cancel Button on it. How do i click on them.

I am using Robot Framework with Scripting language Python. 

Thanks
Sandeep

Laurent Bristiel

unread,
Mar 13, 2014, 5:03:15 AM3/13/14
to robotframe...@googlegroups.com
Hello,

If you are using the Selenium2Library, then check this keyword:
http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library.html#Choose Ok On Next Confirmation

Laurent

Sandeep V Mohan

unread,
Mar 13, 2014, 8:08:42 PM3/13/14
to robotframe...@googlegroups.com

Thanks for your reply Laurent.

I tried with that alert pop up and it is not working. I am attaching the alert dialogue for your reference. Please check it.

Thanks
Sandy

GAURAV DEORE

unread,
Mar 14, 2014, 12:10:37 AM3/14/14
to tosan...@gmail.com, robotframe...@googlegroups.com
If you would get OK button xpath then you can use Keyword => Press Key   //button[@id='ok']  \\13





--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.



--
------------------------------
Warm Regards,
GAURAV S. DEORE.

Almost Two

unread,
Oct 7, 2014, 12:08:09 PM10/7/14
to robotframe...@googlegroups.com
Is more easy to use

Confirm Action

Using Selenium2Library
Reply all
Reply to author
Forward
0 new messages