Skip to content
New issue

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

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

Already on GitHub? # to your account

wdi5 fluent async api vs wdio async api #136

Closed
vobu opened this issue Feb 8, 2022 · 6 comments
Closed

wdi5 fluent async api vs wdio async api #136

vobu opened this issue Feb 8, 2022 · 6 comments

Comments

@vobu
Copy link
Contributor

vobu commented Feb 8, 2022

Hi @vobu , the async api works quite well! 👍 One thing I found is, seems that a fluent "click" is not supported yet.

This one work:

const button = await myButton.getWebElement();
await myButton.click();

This one is not working:

await myButton.getWebElement().click();

Error:
image

Originally posted by @cwang1221 in #104 (reply in thread)

@vobu
Copy link
Contributor Author

vobu commented Feb 8, 2022

this is b/c you're working in wdio-native land here:
await myButton.getWebElement().click()

the equivalent with the wdi5 fluent async api would be:
await browser.asContro(buttonSelector).firePress()

@vobu
Copy link
Contributor Author

vobu commented Feb 12, 2022

@cwang1221
and i just got corrected on this by @Siolto: firePress() is considered no-good-practice, that's why we put in #138.
also, we'll make sure that await browser.asControl(selector).getWebElement().click() will work.

@github-actions
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Mar 15, 2022
@vobu
Copy link
Contributor Author

vobu commented Mar 25, 2022

we're still evaluating different ideas, the most recent being #179 - will come to a decision pretty soon.
what's always going to be possible is transitioning from wdi5-api to WedriverIO-api via .getWebElement()

@github-actions github-actions bot removed the stale label Mar 26, 2022
@github-actions
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Apr 25, 2022
@vobu
Copy link
Contributor Author

vobu commented Apr 25, 2022

there's now 2 options:

  1. use wdi5's getWebElement() to transition to the WebdriverIO api
  2. use $() in the fluent async api for subsequent WebdriverIO api calls - e.g. await browser.asControl(iaSyncSelector).$().isDisplayed()

@vobu vobu removed the stale label Apr 25, 2022
@vobu vobu closed this as completed Apr 25, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant