Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support nested page object models #3

Open
michaelgoeke opened this issue Oct 12, 2022 · 0 comments
Open

support nested page object models #3

michaelgoeke opened this issue Oct 12, 2022 · 0 comments
Labels
enhancement New feature or request page object model

Comments

@michaelgoeke
Copy link
Member

e.g. given class home_page and class menu_header would like to have property home_page.menu_header reference nested page object model.
Nested page object model should include outer scope selector (prefix selector) from the point of view of the hosting page.
e.g.

import { Page } from "@playwright/test";
import { menu_header } from "./menu_header";

export class home_page {
    private static menu_header_selector = `[data-testid="menuHeader"]`;
    static menu_header = menu_header;

    //additional properties...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request page object model
Projects
None yet
Development

No branches or pull requests

1 participant