Skip to content

Playwright to codecept locator conversion #4236

@dylanahoang

Description

@dylanahoang

What are you trying to achieve?

I want to create a Playwright locator by using features not supported by Codecept+Playwright
(a) react component selection ("_react=XXX")
(b) data-testid selection against the virtual/shadow DOM ("[data-testid='testdonebutton']")

I then want to use Codecept assertions against these Playwright locators
I.see(pwLocator.toString())

What do you get instead?

I get a variety of issues including XPath conversion failing and certain selector string fragments not being recognized like "_react"

Details

I can't not use Codecept assertions because my code base is cross platform and we'll eventually want to support react-native based assertions. Figuring this out will help us really speed up our test development Do you have any recommendations?

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