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/pages/PortalPage.java | ||
---|---|---|
8 | 8 |
import java.util.concurrent.TimeUnit; |
9 | 9 |
|
10 | 10 |
import org.apache.bcel.verifier.exc.LinkingConstraintException; |
11 |
import org.apache.commons.lang.StringUtils; |
|
12 | 11 |
import org.apache.log4j.Logger; |
13 | 12 |
import org.openqa.selenium.By; |
14 | 13 |
import org.openqa.selenium.NoSuchElementException; |
... | ... | |
334 | 333 |
public <T extends PortalPage> T clickLink(BaseElement element, Function<? super WebDriver, Boolean> isTrue, Class<T> type, Long duration, TimeUnit waitUnit) { |
335 | 334 |
|
336 | 335 |
String targetWindow = null; |
337 |
List<String> targets = element.getLinkTargets(); |
|
336 |
List<String> targets = element.getLinkTargets(driver);
|
|
338 | 337 |
if(targets.size() > 0){ |
339 | 338 |
targetWindow = targets.get(0); |
340 | 339 |
} |
341 | 340 |
|
342 |
if(logger.isInfoEnabled()){ |
|
343 |
logger.info("clicking on " + element.toStringWithLinks());
|
|
341 |
if(logger.isInfoEnabled() || logger.isDebugEnabled()){
|
|
342 |
logger.info("clickLink() on " + element.toStringWithLinks());
|
|
344 | 343 |
} |
345 | 344 |
element.getElement().click(); |
346 | 345 |
if(targetWindow != null){ |
... | ... | |
386 | 385 |
} |
387 | 386 |
|
388 | 387 |
|
389 |
/**
|
|
390 |
* replaces all underscores '_' by hyphens '-'
|
|
391 |
*
|
|
392 |
* @param featureName
|
|
393 |
* @return
|
|
394 |
*/
|
|
395 |
protected String normalizeClassAttribute(String featureName) {
|
|
396 |
return featureName.replace('_', '-');
|
|
397 |
}
|
|
388 |
/**
|
|
389 |
* replaces all underscores '_' by hyphens '-'
|
|
390 |
*
|
|
391 |
* @param featureName
|
|
392 |
* @return
|
|
393 |
*/
|
|
394 |
protected String normalizeClassAttribute(String featureName) {
|
|
395 |
return featureName.replace('_', '-');
|
|
396 |
}
|
|
398 | 397 |
|
399 | 398 |
|
400 | 399 |
} |
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