cleaned code of getWebDriverLogs, removed duplication. Handling UnsupportedOperationException for htmlunit.