-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Better typings Support for the webdriver api #3430
Comments
I thought I had this as an opened issue...I probably wrote my plan in a Google Doc. Anyway, I am trying to upgrade the DefinitelyTyped selenium-webdriver ambient typings. Using an up-to-date selenium-webdriver ambient typings will fix some of the weird things we are doing in TypeScript to fake in types for webdriver. So as part of the task list is to clean up the Protractor codebase. This would mean that So your items:
|
No it does not prevent me (<any> browser).executeScript(...) Works in both cases, however it always nice to have the issue fixed at the root instead of using workarounds. 😏 I actually ended up having to add a different workaround to my codebase that hides the above issue. declare const browser: any; The above typing is needed since importing
export var browser: Browser = global['protractor']['browser']; However I need to be able to call execute script from the However I see you already made changes related to this, I haven't test it though. |
Workarounds! Win! I agree that fixing the root problem (selenium-webdriver DefinitelyTyped) will solve some of TypeScript issues. I'll come back to comment on this issue on |
Related issue to clean up typings: #3500 |
Related issue to not having manage on browser: #3477 |
Will need to be resolved when requiring |
DefinitelyTyped selenium-webdriver typings PR DefinitelyTyped/DefinitelyTyped#10852. |
To keep track of progress:
Also, we should think about how we are importing
Option 1 does not take into account for using |
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - refactor gulpfile task 'types' to use multiple files from tsc - add browser method types applied from webdriver this closes angular#3430, closes angular#3477, and closes angular#3500
- fix exampleTypescript to have noGlobals - change the exampleTypescript tsconfig.json to include @types - alias promise as wdpromise everywhere - add browser method types applied from webdriver - remove gulpfile 'types' task - remove webdriver namespace from globals.d.ts this closes #3430, closes #3477, and closes #3500
Feature Request
Better typings Support for the webdriver api
Currently many of the webdriver functions specified in the selenium api are not possible to use with the new protractor typings. I see why you might want to hide some of the api, however a lot is missing right now.
We upgraded to 4.0.2 and want to use the new typings however we are unable to as long as parts of the api is missing. (at least in a easy and clean way)
We specifically use
But more can be found her: http://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_WebDriver.html
As a small note shouldn't
be an interface instead? I believe an interface would be possible to extend without changes code in the protractor module.
Let me know if you are interested in a pull request
The text was updated successfully, but these errors were encountered: