Skip to content

Commit

Permalink
Fixed initializing LunaGridSessions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Reiche committed Oct 12, 2021
1 parent a6dcb69 commit a9527ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private static Injector initIoc() {
}
//return Guice.createInjector(prevModule);
} catch (Exception e) {
LOGGER.error(e.getMessage());
LOGGER.error("Unable to initialize modules", e);
}
return Guice.createInjector(prevModule);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import eu.tsystems.mms.tic.testframework.utils.WebDriverUtils;
import eu.tsystems.mms.tic.testframework.webdriver.WebDriverFactory;
import java.net.URL;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -102,9 +103,11 @@ private static String getThreadSessionKey(String sessionKey) {
* Getting multi binder set programmatically
* @see {https://groups.google.com/forum/#!topic/google-guice/EUnNStmrhOk}
*/
webDriverFactories.forEach(webDriverFactory -> {
webDriverFactory.getSupportedBrowsers().forEach(browser -> WEB_DRIVER_FACTORIES.put(browser, webDriverFactory));
});
webDriverFactories.stream()
.sorted(Comparator.comparing(f -> f.getClass().getSimpleName()))
.forEach(webDriverFactory -> {
webDriverFactory.getSupportedBrowsers().forEach(browser -> WEB_DRIVER_FACTORIES.put(browser, webDriverFactory));
});
}

private static void storeWebDriverSession(EventFiringWebDriver eventFiringWebDriver, SessionContext sessionContext) {
Expand Down

0 comments on commit a9527ba

Please sign in to comment.