2
votes

In my project, there is something called creating tasks. Upon creation of tasks and I close the page, system prompts me an alert "You are about to close this application and save all changes...."

followed by an OK and Cancel.

Using F12, am unable to detect neither the alert nor the OK/Cancel buttons. Please take a look in the image uploaded.

enter image description here

2

2 Answers

3
votes

Personally I have never worked with alerts in tests so I might be wrong, but I think that keyword Handle Alert should be helpful for you.

http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Handle%20Alert

0
votes

Could you please try with Dismiss Alert or Confirm Action

For more details check the below link

http://robotframework.org/Selenium2Library/Selenium2Library.html#Dismiss%20Alert

Confirm Action

http://robotframework.org/Selenium2Library/Selenium2Library-1.8.0.html#Confirm%20Action

Try with the below keyword

Choose Cancel On Next Confirmation