exception - Selenium 2.18.0 - UnhandledAlertException upon driver initialization, how can you handle it? -



exception - Selenium 2.18.0 - UnhandledAlertException upon driver initialization, how can you handle it? -

i did mistaked , updated pom.xml selenium 2.18.0 unhandledalertexception during operation new feature:

alert handling in firefox , ie: throwing unhandledalertexception if alert nowadays during operation. unhandled alert dismissed mitigate repeat exceptions.

but if phone call

driver = new internetexplorerdriver();

it results in modal dialog nowadays exception, because current scheme needs proxy credentials, filled looping auto-it script (just in case needs it):

dim $arrtitle[2] = ["authentification required", "windows security"] while 1 $stitle in $arrtitle if winexists($stitle) winactivate($stitle); send("{home}"); send("+{end}"); send("{del}"); send("user"); send("{tab}"); send("{home}"); send("+{end}"); send("{del}"); send("password"); send("{enter}"); sleep(1000) endif next sleep(500) wend

so how can prevent exception? if

try { driver = new internetexplorerdriver(); } catch(unhandledalertexception e) {}

i receive driver=null

thanks time

if scheme needs proxy credentials should able pass through desired capabilities driver.

see http://code.google.com/p/selenium/wiki/desiredcapabilities#proxy_json_object on use.

exception selenium unhandled-exception

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -