i have selenium test tests login of site through browser instance available on selenium-grid. works fine when using firefox browser instance when using safari test cannot through entire test because safari pops window question "would me save password".
it doesn't seem appear window_handle nor alert. how can have selenium dismiss safari popup , continue test?
you can't. webdriver cannot interact browser and/or os specific dialogs.
you have 2 choices:
- save/dismiss password manually first time run through test, reuse profile every time.
press enter or esc programatically via programming language. didn't specify 1 you're using, here's java example:
robot robot = new robot(); robot.keypress(keyevent.vk_escape); robot.keyrelease(keyevent.vk_escape);
it's hack, it's reliable , it's i've been doing overcome similar issues.
Comments
Post a Comment