epam / JDI

Try JDI Light https://github.com/jdi-testing/jdi-light
GNU General Public License v3.0
143 stars 108 forks source link

JDI tries to open webdriver in cycle if there are any problems in chrome webdriver #154

Open romaha08 opened 6 years ago

romaha08 commented 6 years ago

If there is any problem in chrome webdriver JDI open driver many times. As result we have many processes opened and few PC resources

Log something like: 557 [main] INFO JDI Logger - Init test run 265166 [main] INFO JDI Logger - Open page 'Start Page' for Start Page(https://ngp-portal-qa.dev.ngp.zoetis.com/) Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 15183 Only local connections are allowed. Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 42924 Only local connections are allowed.

Exception: Failed to invoke configuration method com.zoetis.ngp.qa.InitNGPUITest.setUp:java.lang.AssertionError: Do action Open page 'Start Page' failed. Can't get result. Reason: java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;

bashilovpa commented 6 years ago

Found a similar issue for C #: Method public IWebDriver GetDriver(string driverName) in WebDriverFactory.cs throws Exception when problems with webdriver oocurs, but this method called inside of Wait method (Line 31 Timer.cs) in line 35 ...waitFunc.AvoidExceptions()... and inside of this exceptions are not raised up. As result we loose exception that was thrown by public IWebDriver GetDriver(string driverName)