Capturing JavaScript error in Selenium

前端 未结 12 730
盖世英雄少女心
盖世英雄少女心 2020-12-02 08:15

Is there a way to capture errors occurring in the DOM in Selenium and probably flag the same as an error in the page?

To give a brief exam

12条回答
  •  被撕碎了的回忆
    2020-12-02 08:26

    Non-window.onerror-based solution (I did not try): http://sejq.blogspot.com/2008/12/can-selenium-detect-if-page-has.html

提交回复
热议问题