Skip to content
Snippets Groups Projects
Commit 8c30d7cc authored by Michael Hamann's avatar Michael Hamann
Browse files

[Misc] Fix test failures on Chrome in LiveDataIT

* Click on the left of the heading to avoid clicking on the date picker
  popup.

(cherry picked from commit aaaa0bff)
parent 7ab71839
No related branches found
No related tags found
No related merge requests found
...@@ -933,7 +933,13 @@ private void internalEdit(String columnLabel, int rowNumber, String fieldName, S ...@@ -933,7 +933,13 @@ private void internalEdit(String columnLabel, int rowNumber, String fieldName, S
if (save) { if (save) {
// Clicks somewhere outside the edited cell. We use the h1 tag because it is present on all pages. // Clicks somewhere outside the edited cell. We use the h1 tag because it is present on all pages.
new Actions(getDriver().getWrappedDriver()).click(getDriver().findElement(By.tagName("h1"))).perform(); // Click close to the left border of the h1 to avoid clicking on a potential date picker that is
// hopefully not that close to the left.
WebElement h1 = getDriver().findElement(By.tagName("h1"));
int width = h1.getRect().getWidth();
// Calculate the offset from the center to be close to the left border of the h1.
int xOffset = -(width / 2 - 2);
new Actions(getDriver().getWrappedDriver()).moveToElement(h1, xOffset, 0).click().perform();
} else { } else {
// Press escape to cancel the edition. // Press escape to cancel the edition.
new Actions(getDriver().getWrappedDriver()).sendKeys(Keys.ESCAPE).build().perform(); new Actions(getDriver().getWrappedDriver()).sendKeys(Keys.ESCAPE).build().perform();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment