Relative Content

Tag Archive for typescriptautomated-testsplaywright

Playwright is not locating data-testId

Im using data-testid to locate a title entry field on a page. The input field has the tag “createTitle”, however when I use the getByTestId method to locate it, the element cant be found and the test times out. Using VS codes ability to select a locator and selecting the field i’m trying to access, returns the suggestion to use:

page object breaks waitForElement on Playwright

Watching some lessons I wanted to implement an universal importer for page objects, instead of calling the my_file.page.ts on each test, I wanted to import all *.page.ts in a single index.ts file but I can no longer call the locators and use native Playwright methods with this.