问题
I am trying to capture the alert using selenium RC C# function getAlert() as a result of checking the availability of an account ID when the button is clicked. The form will be submitted to the server from one frame let's say "frame_A" and the server will response by javascript code "alert("The account is available")" into another frame called "frame_B" but somehow the selenium getAlert() cannot detect the existence of the alert.
Have been looking for solutions, but so far have not found it.
Any help, will be greatly appreciated.
Thanks
回答1:
Have you tried selecting the iframe before trying to getAlert() using selectFrame(frameId) method? I am not sure if this will solve your problem but worth giving a try. Thanks
来源:https://stackoverflow.com/questions/5320413/selenium-cannot-get-alert-thrown-in-iframe