Add proper logs if webdriver initialization fails
See original GitHub issueThe 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:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@crowin in ur case, it fails because of
Allure
, since it’s trying to take a screenshot on closed webdriver in this line of codeat io.qameta.allure.selenide.AllureSelenide.afterEvent(AllureSelenide.java:102)
. You could simply debug code by putting breakpoints hereat com.codeborne.selenide.drivercommands.Navigator.navigateTo(Navigator.java:67)
Fixed by PR https://github.com/selenide/selenide/pull/958