Skip to content

Commit 7bc7243

Browse files
authored
Use WebElement.getDomProperty for element src (#2538)
1 parent a3968ce commit 7bc7243

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/org/labkey/test/tests/SimpleModuleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ private void validateThumbnails(String thumbnailImage, @Nullable String thumbnai
850850
Locator popup = Locator.tag("div").withAttribute("id", "helpDiv").descendant("img").withAttributeContaining("src", popupImage).
851851
withAttributeContaining("style", popupWidth != null ? "width:" + popupWidth : "max-width:300px");
852852
shortWait().until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("#helpDiv")));
853-
String src = StringUtils.trimToEmpty(popup.findElement(getDriver()).getDomAttribute("src"));
853+
String src = StringUtils.trimToEmpty(popup.findElement(getDriver()).getDomProperty("src"));
854854

855855
fireEvent(thumbnail, SeleniumEvent.mouseout);
856856
Locator.tagWithClass("th", "labkey-selectors").findElement(getDriver()).click(); // safe out-click in the first header cell
@@ -1230,7 +1230,7 @@ private void verifyReportThumbnail(@LoggedParam String reportTitle)
12301230
WebElement reportLink = waitForElement(Locator.xpath("//a[text()='" + reportTitle + "']"));
12311231
mouseOver(reportLink);
12321232
WebElement thumbnail = waitForElement(Locator.xpath("//div[@class='thumbnail']/img").notHidden());
1233-
String thumbnailData = WebTestHelper.getHttpResponse(thumbnail.getDomAttribute("src")).getResponseBody();
1233+
String thumbnailData = WebTestHelper.getHttpResponse(thumbnail.getDomProperty("src")).getResponseBody();
12341234

12351235
int lengthToCompare = 5000;
12361236
int diff = LevenshteinDistance.getDefaultInstance().apply(expectedThumbnail.substring(0, lengthToCompare), thumbnailData.substring(0, lengthToCompare));

0 commit comments

Comments
 (0)