Skip to content

TypeError: Cannot create property 'lastIndex' on string when using playwrightConfigOptions.grep in browserstack.yml #54

@amir-ziaei

Description

@amir-ziaei

Given configuration:

platforms:
  - os: OS X
     ...
    playwrightConfigOptions:
      grep: '@myTag'

The following error happens:

Error: 2025-11-06 14:21:58 - info: [GrpcClient] PlaywrightConfig request successful
TypeError: Cannot create property 'lastIndex' on string '@myTag'

This prevents filtering Playwright tests by tags or grep in general. I cannot use the workaround of passing the grep directly to the command line because the following pattern would not be possible:

platforms:
  - os: OS X
     ...
    playwrightConfigOptions:
      grep: '@slow'
  - os: OS X
     ...
    playwrightConfigOptions:
      grep: '@fast'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions