-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[💥 Breaking] Remove the devtools
package as it requires a lot of maintenance and has no real value anymore
#11860
Comments
Thanks for reporting! We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers! |
devtools
package as it requires a lot of maintenance and has no real value anymoredevtools
package as it requires a lot of maintenance and has no real value anymore
This (hopefully) will be my first contribution to wdio. If it is ok I want to give a try on this. |
@gromanas thanks for picking this up. Can you do me a favor and also raise a PR against |
Thank you for all your effort on wdio. Not in a pc at the moment. Will do this asap. |
@christian-bromann what I should include in this PR as it will be against |
Please make two separate PRs:
|
If devtools service is being deprecated, what is the recommended approach to capture browser traffic in WDIO tests? |
@rsinghi with Bidi support around the corner we will have cross browser support for it natively in WebdriverIO soon. Today, you can already use the |
- Update website for AutomationProtocols.md and devtools/README.md Contributes to: webdriverio#11860 Signed-off-by: Georgios Romanas gromanas@gmail.com
- Update website for AutomationProtocols.md, Config and Options.ts with a deprecation warning Contributes to: webdriverio#11860 Signed-off-by: Georgios Romanas gromanas@gmail.com
- Fix typo on Options.ts Contributes to: webdriverio#11860 Signed-off-by: Georgios Romanas gromanas@gmail.com
- Fix text on packages/devtools/README.md Contributes to: webdriverio#11860 Signed-off-by: Georgios Romanas gromanas@gmail.com
- Change text as per comment on Options.md Contributes to: webdriverio#11860 Signed-off-by: Georgios Romanas gromanas@gmail.com
* chore(devtools): - Update website for AutomationProtocols.md and devtools/README.md Contributes to: #11860 Signed-off-by: Georgios Romanas gromanas@gmail.com * Update devtools/README.md * Update website/docs/AutomationProtocols.md Co-authored-by: Christian Bromann <git@bromann.dev> * Update website/docs/AutomationProtocols.md Co-authored-by: Christian Bromann <git@bromann.dev> * chore(devtools): - Update website for AutomationProtocols.md, Config and Options.ts with a deprecation warning Contributes to: #11860 Signed-off-by: Georgios Romanas gromanas@gmail.com * chore(devtools): - Fix typo on Options.ts Contributes to: #11860 Signed-off-by: Georgios Romanas gromanas@gmail.com * chore(devtools): - Fix text on packages/devtools/README.md Contributes to: #11860 Signed-off-by: Georgios Romanas gromanas@gmail.com * chore(devtools): - Change text as per comment on Options.md Contributes to: #11860 Signed-off-by: Georgios Romanas gromanas@gmail.com * Update website/docs/AutomationProtocols.md --------- Signed-off-by: Georgios Romanas gromanas@gmail.com Co-authored-by: Christian Bromann <git@bromann.dev>
I will take on the next step which is removing the package from this repo. |
Hi, @christian-bromann when will the v9 be released?
And I also want to know how to intercept network, is there a workaround with webdriver way? |
yes, network intercepts can be made via the |
@christian-bromann I found in the document It said the cmd requires CDP, but I don't understand: if the browser should support CDP or if we have to use "devtools" for "automationProtocol". Do Safari, Firefox browsers support "mock"? |
And I found another answer from you @christian-bromann : #2759 (comment) If I use mock API, and I want to modify the HTTP request headers. You mean the "headers" in the mock API are just for selenium server requests not for the browser. So what can I do to modify the request header? |
Not right now but they will in the future through Bidi. I am currently implementing Bidi support for the mock command in v9 and it will allow cross browser mocking using the same interface.
I will enhance the const mock = await browser.mock('/some/path', {
requestWith: {
// set request header
header: {
'x-foo': 'bar'
}
}
})
// keep response but update response headers
mock.response(null, {
header: {
'x-bar': 'foo'
}
}) What do you think? |
Thanks, @christian-bromann very cool! Currently what I'm doing is migrating from Playwright, but I did a lot of research, and I found what Wedriverio can not do but Playwright can, such as network intercept(totally modify request header) or some APIs like upload files "that this command is only supported if you use a Selenium Hub, Chromedriver or EdgeDriver directly.", they're not compatible for all browsers. So another concern is I don't know very clearly which API is workable for all browsers, which is not , that' very important for our project testing, we're running on every popular browser. Any ideas about my concern? thanks a lot. And BTW, want to know when v9 will be released. |
The idea of WebdriverIO is that all commands work the same way in all browser. Unfortunately as browser adopt the new Bidi standard, we have different progress on certain APIs which will hopefully resolve itself some day. In the past we enabled these features by using Chrome DevTools (which only works for Chrome and Edge in most cases) but with Bidi we move away from that. That said, network interception will work the same way across browser once these features land. I am currently running interception tests successfully in Canary and I expect this to work in FF Nightly soon as well. I can't speak about Safari, except that they plan to implement it.
You can already use v9 today using the |
Wow! very quick response, thanks, @christian-bromann , I have lots of questions about Webdriverio, but maybe here is not a good place to ask. |
Sorry, I forgot an important feature of network intercept is Websocket, does it support? @christian-bromann Playwright: https://playwright.dev/docs/api/class-websocket |
Join our Discord server and ask away 😉
This currently does not seem to be supported by the protocol but is something we can implement in WebdriverIO via script injection. |
The
devtools
package has been used to automate WebdriverIO through Puppeteer. Back in the days this was useful because Puppeteer helped with setting up Chrome. Today this is done by WebdriverIO and there is no real value anymore to run automation through CDP rather than WebDriver. In fact there are a lot of bugs where the expected automated behavior was not met due to CDP specifics that we were never able to fix e.g. switching windows and run commands in them.Moving on it makes most sense to remove this capability and force users to use WebDriver. We will use the
devtools
package for a different project.This is a v9 task and pull requests should be raised against the
v9
branch. Join the🙏-contribute
channel on Discord if you are interested to join us in this effort.The text was updated successfully, but these errors were encountered: