Revision adfb51b3
Added by Andreas Kohlbecker over 11 years ago
7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java | ||
---|---|---|
4 | 4 |
package eu.etaxonomy.dataportal.selenium; |
5 | 5 |
|
6 | 6 |
import java.io.IOException; |
7 |
import java.util.concurrent.TimeUnit; |
|
7 | 8 |
|
8 | 9 |
import org.apache.log4j.Logger; |
9 | 10 |
import org.openqa.selenium.WebDriver; |
... | ... | |
33 | 34 |
private static final String FIREXPATH_VERSION = "0.9.7"; |
34 | 35 |
private static final String DISABLE_ADD_ON_COMPATIBILITY_CHECKS_VERSION = "1.3"; |
35 | 36 |
|
37 |
private static final long IMPLICIT_WAIT_DEFAULT = 5; |
|
38 |
|
|
39 |
|
|
36 | 40 |
public static WebDriver newWebDriver() { |
37 | 41 |
|
38 | 42 |
WebDriver newDriver = null; |
... | ... | |
51 | 55 |
newDriver = initInternetExplorerDriver(); |
52 | 56 |
break; |
53 | 57 |
} |
58 |
|
|
54 | 59 |
} catch (NullPointerException e) { |
55 | 60 |
SystemUtils.handleInvalidSystemProperty(SYSTEM_PROPERTY_NAME_BROWSER, e); |
56 | 61 |
} catch (IllegalArgumentException e) { |
57 | 62 |
SystemUtils.handleInvalidSystemProperty(SYSTEM_PROPERTY_NAME_BROWSER, e); |
58 | 63 |
} |
64 |
|
|
65 |
newDriver.manage().timeouts().implicitlyWait(IMPLICIT_WAIT_DEFAULT, TimeUnit.SECONDS); |
|
66 |
logger.info("Implicit wait set to : " + IMPLICIT_WAIT_DEFAULT + TimeUnit.SECONDS); |
|
67 |
|
|
59 | 68 |
return newDriver; |
60 | 69 |
} |
61 | 70 |
|
Also available in: Unified diff
fixing #2987 (selenium test Illicium@floramalesiana(eu.etaxonomy.dataportal.selenium.tests.flMalesiana.FloraMalesiana_OriginalSourceTest) fails due to timeouts) and adapting code to selenium 2.26.0 in pom