selenium - PYTHON - Can I run an event listener to listen for errors throughout my script? -


sorry if has been asked before, couldn't find related on python , regarding using selenium.

i'm running selenium script on particular website after staying on site long, site asks me login again. event gives me stale element reference error midway during running of code, have enter password, enter, , brings me (e.g script running until prompted login details).

my question is, possible create event listener listens particular error throughout entire script , function? obviously, know there error handling, knowledge, doesn't work continuously... unless wrap entire script around try...except block, i'd rather not do.

are there options? missing obvious? here i've tried far simplegui package, received cannotsendrequest(self.__state) error upon running.

timer = simplegui.create_timer(2000, check) timer.start() 


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -