question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add proper logs if webdriver initialization fails

See original GitHub issue

The problem

Hi, when web driver init is failing, then we get only one logs, like this

java.lang.IllegalStateException: No webdriver is bound to current thread: 19. You need to call open(url) first.

This logs doesn’t tell us anything, only that we couldn’t init webdriver. What we would like to see? THE reason of failing. The actual reason is “suppressed” in Navigator class in catch blocks.

So please, fix this, or add something like this at least LOGGER.info("ERROR : [{}]", e.getMessage());

Code To Reproduce Issue [ Good To Have ]

Init webdriver with error.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Lewkacommented, Jul 24, 2019

@crowin in ur case, it fails because of Allure, since it’s trying to take a screenshot on closed webdriver in this line of code at io.qameta.allure.selenide.AllureSelenide.afterEvent(AllureSelenide.java:102). You could simply debug code by putting breakpoints here at com.codeborne.selenide.drivercommands.Navigator.navigateTo(Navigator.java:67)

0reactions
asolntsevcommented, Jul 31, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid --log-level value. Unable to initialize logging. Exiting ...
I just came across this error and fixed it. The "Invalid --log-level value" error is caused by using ChromeDriver as Chrome. Selenium runs ......
Read more >
Debugging Selenium Scripts with Logs (Log4j Tutorial)
Logs are an exceptional assistant in debugging the program execution issues and failures; Logs can also be reviewed to ascertain the application's health...
Read more >
how to create log files in selenium webdriver using Log4J
In this post, will see how to create log files in selenium using Log4J. Log files play important role in automation and in...
Read more >
How to fix common Selenium errors? - Ultimate QA
Selenium webdriver errors that are commonly faced by QA Engineers. This article covers all the common errors including Firefox and Selenium ...
Read more >
Chrome Driver Issue while executing Selenium Tests
Hi all, I am executing some Selenium tests and I am getting the below error now.It was working fine until yesterday with same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found