[🚀 Feature]: Adding BiDi in DefinitelyTyped
Feature and motivation
First I want to thank you for introducing Bidi Support and Browsing context commands. It will be great if the features above are present in DefinitelyTyped so we can use it in TypeScript projects.
Usage example
beforeEach(async function () {
driver = await env
.builder()
.setFirefoxOptions(new firefox.Options().enableBidi())
.build()
})
Do not compile in TS project because enableBidi() is not present in DefinitelyTyped.
@dtopuzov, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
Thank you!
This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.
@pujagani is this the responsibility of Selenium project, or is this something that anyone can contribute to the project by taking what has already been implemented in our repo and adding it to that other repo?
I'm not sure we should be tracking this here since there will always be things we can put over there. What do you think?
Anyone can help contribute to the project and it might be a good candidate for first-bug sort of work too. You are right, tracking this is hard because tracking Selenium's BiDi work itself is hard and then tracking something that is part of a different project is harder.
If I understand this correctly, what goes into DefinitelyTyped is the type definitions for TypeScript. Then, for new code, this should be added by the person adding that code.
For existing code, we should create issues for missing types. Overall, I think this is the responsibility of the project, or at least point out what is missing.
Are the docs that show how to add these things?
@diemol you are right, DefinitelyTyped is a community effort to provide typings for packages that do not provide such together with the package.
I think it will be better if the Selenium project provides its official typings together with selenium-webdriver npm package. Hope that will give more consistency between what is available as APIs in JavaScript and what is exposed in typings for TS projects (why not even re-write selenium-webdriver package itself in TypeScript).
Current definitions at DefinitelyTyped are ok in general (no major issues, just some missing pieces like this one). I hope once we have official BiDi support in Selenium we will have some way to use it in TypeScript projects too.
I think TypeScript support is important for the success of the Selenium project because most modern web development is Typescript (Angular/React/Vue) and engineers prefer writing tests in the same language they implemented the product.
It's an open issue — https://github.com/SeleniumHQ/selenium/issues/10942 @harsha509 was looking into it at one point, but I know he's got a lot on his plate right now.
@AutomatedTester what does @nightwatchjs do? Is there an interest from your end on changing what we are doing?
This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
Why don't we put the type definitions in our repo instead? @harsha509 do we still want to move to TypeScript?
Why don't we put the type definitions in our repo instead? @harsha509 do we still want to move to TypeScript?
HI @diemol ,
I have already moved entire bindings to TS (except atoms). Currently fixing type issues and migrating tests.
Thanks, Sri
That is great, @harsha509!
@harsha509 what more needs to be done for this issue, or can we close it?