Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/org/labkey/test/components/ui/grids/EditableGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,12 @@ public void selectCellRange(WebElement startCell, WebElement endCell)
private void dragToCell(WebElement elementToDrag, WebElement destinationCell)
{
var size = destinationCell.getSize();
Locator.XPathLocator selectionHandleLoc = Locator.byClass("no-margin-top detail__header--name");
WebElement title = selectionHandleLoc.findElement(getDriver());
Comment on lines +995 to +996
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think all editable grids have this sort of header. Also, components should usually find elements only within themself (findElement(this) instead of findElement(getDriver())).

That being said, there is an existing method in EditableGrid to dismiss the tooltip.

Suggested change
Locator.XPathLocator selectionHandleLoc = Locator.byClass("no-margin-top detail__header--name");
WebElement title = selectionHandleLoc.findElement(getDriver());
dismissPopover();


new Actions(getDriver())
// Action to avoid tooltip
.moveToElement(title)
// WebDriver doesn't calculate correct location to click the cell selection handle
.moveToElement(elementToDrag, 0, 7)
.clickAndHold()
Expand Down