How to handle onload javascript alerts in selenium?
It is not being captured in Selenium IDE neither it is being handled by getAlert() function.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Even I faced the same problem. After several hours spent with selenium, found the solution for handling java script alerts and popups.
we can use the keyPressNative of selenium to handle the java script alerts from the selenium RC.
Here is how the
key*Native()method have to be used:It is not advisable but helped me in handling some of the selenium failures.