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

Expose remoteChrome.Client types on CDPSession #8228

Closed
Klaster1 opened this issue Jul 9, 2024 · 2 comments · Fixed by #8265
Closed

Expose remoteChrome.Client types on CDPSession #8228

Klaster1 opened this issue Jul 9, 2024 · 2 comments · Fixed by #8265
Assignees
Labels
TYPE: enhancement The accepted proposal for future implementation.

Comments

@Klaster1
Copy link

Klaster1 commented Jul 9, 2024

What is your Scenario?

Thanks to the recent addition of getCurrentCDPSession, direct calls to CDP became much more ergonomic. However, the method returns an unknown, offering no CDP client method completion. This is awkward.

What are you suggesting?

TestCafe already uses "remote-chrome-interface" internally, make the getCurrentCDPSession return remoteChrome.Client instead of unknown.

What alternatives have you considered?

For now, I use a wrapper with explicit type casting:

import type remoteChrome from 'chrome-remote-interface';
export const getCdpClient = async () => (await t.getCurrentCDPSession()) as remoteChrome.Client;
@Klaster1 Klaster1 added the TYPE: enhancement The accepted proposal for future implementation. label Jul 9, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Jul 9, 2024
@PavelMor25 PavelMor25 added the STATE: Enhancement accepted An enhancement has been accepted. label Jul 11, 2024
Copy link

Thank you for bringing this enhancement to our attention. We will be happy to look into it. We'll update this thread once we have news. If we do not publish any new comments, it's safe to assume that there are no new updates.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: Enhancement accepted An enhancement has been accepted. labels Jul 11, 2024
@PavelMor25 PavelMor25 mentioned this issue Aug 27, 2024
2 tasks
PavelMor25 added a commit that referenced this issue Aug 27, 2024
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose
_Describe the problem you want to address or the feature you want to
implement._

## Approach
_Describe how your changes address the issue or implement the desired
functionality in as much detail as possible._

## References
closes #8228 

## Pre-Merge TODO
- [ ] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail
@Klaster1
Copy link
Author

Klaster1 commented Nov 8, 2024

Thank you for fixing this!

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 8, 2024
@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants