Capturing browser logs with Selenium WebDriver using Java

后端 未结 9 2029
闹比i
闹比i 2020-11-28 03:01

Is there a way to capture browser logs while running automated test cases with Selenium? I found an article on how to capture JavaScript errors in Selenium. But that is just

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 03:43

    Before launching webdriver, we just set this environment variable to let chrome generate it:

    export CHROME_LOG_FILE=$(pwd)/tests/e2e2/logs/client.log
    

提交回复
热议问题