Skip to content

Click keyword behaving incorrectly when page is closed #4108

Open
@BenDTay

Description

@BenDTay

Describe the bug
The Click keyword returns successfully if the non-headless browser page is closed whilst finding the selector. This holds true for when either the individual page and the browser window have been closed.

To Reproduce

  1. Setup a browsing session (either New Browser > New Context > New Page or Open Browser) in a test case or keyword.
  2. Have the robot run a click keyword with an invalid selector
  3. Close the browser tab or window manually before the TimeoutError occurs
  4. See passed Click keyword

Expected behavior
An error should occur similar to other locator keywords stating "Target page, context or browser has been closed".

Desktop (please complete the following information):

  • OS: Windows 10
  • Occurs on all three Browser types
  • Version [19.1.2]

Additional context
Video of issue: https://github.com/user-attachments/assets/2309595d-a843-4351-bfcb-892a68006fea

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions