clickOnElement

suspend fun PageSession.clickOnElement(selector: CssSelector, clickDurationMillis: Long = 100, mouseButton: MouseButton = MouseButton.left)(source)

Finds a DOM element via the given selector, and simulates a click event on it based on its padding box. The current tab doesn't need to be focused.

If this click opens a new tab, that new tab may become focused, but this session still targets the old tab.