However, yours looks like a javascript popup that the built-in Selenium "alert" functionality should be axle go handle.
Hmmn ... without writing the myself, it looks like that should work, but the w3schools page seems a but slow to respond on my PC - are you sure the alert has appreared by the time your code to accept it appears?And I'm a bit puzzled why the alert message on that page is different to the one you mentioned in your first post?
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c3fff286-ff85-483e-ba0b-81741a8d6134%40googlegroups.com.
The OP has used what seems to be he right code ... the issue now is why it doesn't work.