суббота, 20 апреля 2013 г.

Debugging of IEDriver


Sometimes IE test requires debugging. Sometimes at Selenium issue tracker someone asks you for detailed IE log. In this post I want to describe how you could do this.

There are 2 ways to enable debugging for IEDriver right now:

1. using IEDriver locally from binding - by instanciating driver:
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.usingPort(port).withLogFile(new File("path-to-file")).withLogLevel(InternetExplorerDriverLogLevel.TRACE).build();
WebDriver driver = new InternetExplorerDriver(service);
The similar way is implemented at all local ends.

2. using IEDriver at grid/node - by setup properties at selenium node start :
java -Dwebdriver.ie.driver.logfile=path-to-file -Dwebdriver.ie.driver.loglevel=TRACE selenium-jar ....
I don't remember selenium version at which these possibnilities were added but at selenium 2.32 they should work.

Update:
   Grid now supports capabilies [1] as logFile and LogLevel so you could use it in any local end.

[1] https://code.google.com/p/selenium/wiki/DesiredCapabilities

Комментариев нет:

Отправить комментарий