Skip to content

Fix tests to catch issue #1146#2994

Open
DariaBod wants to merge 1 commit into
developfrom
fb_automation_issue1146
Open

Fix tests to catch issue #1146#2994
DariaBod wants to merge 1 commit into
developfrom
fb_automation_issue1146

Conversation

@DariaBod DariaBod self-assigned this May 12, 2026
List<WebElement> dashboardIcons = elementCache().dashboardIconLoc.findElements(elementCache().menuContent);
for (WebElement dashboardIcon : dashboardIcons)
{
getWrapper().mouseOver(dashboardIcon.findElement(By.xpath("./ancestor::li[1]")));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not super important for a use like this but we usually prefer to use Locator.xpath().findElement(context) instead of context.findElement(By.xpath). Locator.findElement wraps the resulting WebElement with a decorator that handles click interception (ReclickingWebElement).

Suggested change
getWrapper().mouseOver(dashboardIcon.findElement(By.xpath("./ancestor::li[1]")));
getWrapper().mouseOver(Locator.xpath("./ancestor::li[1]").findElement(dashboardIcon));

clickNavLink(elementCache().activeDashboardIcon);
}

// Interactions with icon elements on the page to catch GitHub Issue 1146.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This comment describes that mouseOver, not the whole method. Move it closer to the line where the interaction is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants