bringIntoView returned the last boundingBox() unconditionally after the scroll loop exhausted, so an element still outside the viewport would be clicked anyway. Validate the final box against the actual viewport bounds on both axes (innerWidth/innerHeight) and return null otherwise, so humanClick fails instead of clicking an off-screen coordinate.