Revision 6c8ebd8f
Added by Andreas Kohlbecker almost 13 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/FeatureBlock.java | ||
---|---|---|
59 | 59 |
|
60 | 60 |
List<WebElement> fnkList = element.findElements(By.className("footnote-key")); |
61 | 61 |
for(WebElement fnk : fnkList) { |
62 |
footNoteKeys.add(new LinkElement(fnk)); |
|
62 |
footNoteKeys.add(new LinkElement(fnk.findElement(By.tagName("a"))));
|
|
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
List<WebElement> fnList = element.findElements(By.className("footnote")); |
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java | ||
---|---|---|
10 | 10 |
import org.openqa.selenium.NoSuchElementException; |
11 | 11 |
import org.openqa.selenium.WebDriver; |
12 | 12 |
import org.openqa.selenium.WebElement; |
13 |
import org.openqa.selenium.interactions.Actions; |
|
13 | 14 |
import org.openqa.selenium.support.CacheLookup; |
14 | 15 |
import org.openqa.selenium.support.FindBy; |
15 | 16 |
import org.openqa.selenium.support.FindBys; |
... | ... | |
210 | 211 |
return tabs; |
211 | 212 |
} |
212 | 213 |
|
214 |
public void hover(WebElement element) { |
|
215 |
Actions actions = new Actions(driver); |
|
216 |
actions.moveToElement(element, 1, 1).perform(); |
|
217 |
logger.debug("hovering"); |
|
218 |
} |
|
219 |
|
|
213 | 220 |
|
214 | 221 |
/** |
215 | 222 |
* Returns the current URL string from the {@link WebDriver} |
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java | ||
---|---|---|
87 | 87 |
|
88 | 88 |
firefoxProfile.addExtension(CdmDataPortalTestBase.class, "/org/mozilla/addons/firexpath-" + FIREXPATH_VERSION + "-fx.xpi"); |
89 | 89 |
|
90 |
firefoxProfile.setEnableNativeEvents(true); |
|
91 |
|
|
90 | 92 |
// --- allow enabling incompatible addons |
91 | 93 |
// firefoxProfile.addExtension(this.getClass(), "/org/mozilla/addons/add_on_compatibility_reporter-0.8.3-fx+tb+sm.xpi"); |
92 | 94 |
// firefoxProfile.setPreference("extensions.acr.firstrun", false); |
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Allium_guttatum_subsp_guttatum_TaxonProfileTest.java | ||
---|---|---|
103 | 103 |
LinkElement footNoteKey_1 = featureBlock.getFootNoteKeys().get(0); |
104 | 104 |
BaseElement footNote_1 = featureBlock.getFootNotes().get(0); |
105 | 105 |
assertTrue("expecting one footnote 0 to be the footnote for key 0",footNote_1.getText().startsWith(footNoteKey_1.getText())); |
106 |
// FIXME hovering does not jet work |
|
107 |
// footNoteKey_1.getElement().hover();
|
|
108 |
// assertEquals("yellow", footNoteKey_1.getElement().getValueOfCssProperty("background-color"));
|
|
109 |
// assertEquals("yellow", footNote_1.getElement().getValueOfCssProperty("background-color"));
|
|
106 |
|
|
107 |
p.hover(footNoteKey_1.getElement());
|
|
108 |
assertEquals("#ffff00", footNoteKey_1.getElement().getCssValue("background-color"));
|
|
109 |
assertEquals("#ffff00", footNote_1.getElement().getCssValue("background-color"));
|
|
110 | 110 |
|
111 | 111 |
assertEquals("1. R. D. Meikle, Flora of Cyprus 1. 1977", footNote_1.getText()); |
112 | 112 |
|
Also available in: Unified diff
hovering footnotes - Yeah!!