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

[FEATURE REQUEST](playwright) migrate locators from ElementHandle to Locator. #3677

Closed
EgorBodnar opened this issue Jun 4, 2023 · 1 comment · Fixed by #3738
Closed

[FEATURE REQUEST](playwright) migrate locators from ElementHandle to Locator. #3677

EgorBodnar opened this issue Jun 4, 2023 · 1 comment · Fixed by #3738

Comments

@EgorBodnar
Copy link
Contributor

What are you trying to achieve?

In the CodeceptJS Playwright helper all locators are tied to ElementHandle, but it is officially discouraged/deprecated.

Need to move to the Locator

The whole Playwright helper should be changed due to migration to the Locator

@EgorBodnar
Copy link
Contributor Author

EgorBodnar commented Jun 4, 2023

As a temporary solution, use the function getXPathForElement(elementHandle) in the Playwright helper.

Because all the new Playwright functionality is tied to the Locator and it is impossible to use the new Playwright API for elements found through the ElementHandle only if it does not match with devtools-protocol API.

And in the ConceptJS, the elements are searched for in the old way.
Migration would be not so fast.

DavertMik pushed a commit that referenced this issue Jun 4, 2023
* chore: bringing the name of options to a general form

* FEATURE(new playwright api): add .blur()

* DOC(new playwright api): add .blur()

* FEATURE(new playwright api): add .blur()

* FEATURE(new playwright api): add .focus()

* DOC(new playwright api): add .focus()

* FEATURE(new playwright api): add .blur()

* chore: .focus() example extend

* TEST(new playwright api): focus(), blur()

* bump playwright version

* FEATURE(new playwright api): add .clear()

* DOC(new playwright api): add .clear()

* TEST(new playwright api): add .clear()

* chore: change promises in tests to async/await style

* FEATURE(new playwright api):generate both regular and promise-based helper definitions

* FIX: use `findFields()` instead of default `_locate()` to locate an input

* chore: replacing the old clearField method by new one

* chore: run docs script to regenerate doc. | Previous pool requests were merged without generating documentation.

* chore: remove definitions due to moving functionality to the old clearField method

* CI: playwright install

* CI: playwright install

* FEATURE(new playwright api): add .clear() support of the old functionality in case of new codeceptjs version usage with old playwright

* TEST(new playwright api): add support of the old functionality in case of new codeceptjs version usage with old playwright

* install [email protected]

* install [email protected]

* TEST(new playwright api): check div editable text

* TEST(new playwright api): add support of the old functionality in case of new codeceptjs version usage with old playwright

* FIX(new playwright api): add .clear() support of the old functionality in case of new codeceptjs version usage with old playwright

* FEATURE(new playwright api): add .focus()

* FEATURE(new playwright api): add .blur()

* DOC(new playwright api): add .focus()

* TEST(new playwright api): skip test if using old version of the playwright.

* chore: generate doc after merging

* FEATURE(playwright new api): temporary migrate solution before full migration to Locator from old ElementHandle ( see #3677)

* FEATURE(playwright new api): temporary migrate solution before full migration to Locator from old ElementHandle ( see #3677)

---------

Co-authored-by: kobenguyent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants