Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable logging in FirefoxWebdriver in selenium webdriver

I have a project in which I am using Maven, Spring, TestNG and Selenium Webdriver. I want to enable debug logging for Firefox webdriver because I am seeing inconsistent results every time I run the test. When I run via Maven test, i see the log messages from Spring and TestNG show up but I do not see anything from Selenium. Is there a way to enable logging so that i can see what is happening in selenium? I am using Logback.

like image 331
bond Avatar asked Dec 05 '25 06:12

bond


1 Answers

System.setProperty('webdriver.log.file',). This dumps the Java script console log to given file. Hope this helps

like image 177
user1822881 Avatar answered Dec 07 '25 21:12

user1822881



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!