Is it possible to obtain the logger somehow that Selenium WebDriver uses? I want to capture a transcript of all the commands that were issued (eg: open, wait, click, etc). I
I'm using log4j for logging as utils logger is the most easiest and straight forward one that, that can be used (IMHO).
POM dependencies:
org.apache.cassandra
cassandra-all
0.8.1
org.slf4j
slf4j-api
1.6.6
org.slf4j
jcl-over-slf4j
1.6.6
runtime
org.slf4j
jul-to-slf4j
1.6.6
runtime
org.slf4j
log4j-over-slf4j
1.6.6
runtime
imports are following:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
usage:
private static Logger log = LoggerFactory.getLogger(classname.class);
and then just use it as such:
logger.info ("butonCLick");
driver.findElement(By.id("blablabla")).click();
Hope this works for you.