applitools / Eyes.Selenium.JavaScript

Applitools Eyes SDK For Selenium JavaScript WebDriver
Other
18 stars 18 forks source link

Protractor Include in TypeScript types #70

Closed dmhalejr closed 5 years ago

dmhalejr commented 5 years ago

Hello Applitools! 👋

I wanted to ask about an implementation detail in your Typescript typings and wanted to get some clarity. I'm leveraging Typescript 3.3.3 and version 3.6.0 of the selenium-webdriver npm package only.

When I went to transpile my Typescript the eyes.selenium types told me it could not find the protractor npm package properly

Indeed in the types file it looks like the protractor flavors of By, ElementArrayFinder, and ElementFinder are being leveraged.

https://github.com/applitools/Eyes.Selenium.JavaScript/blob/master/typings/index.d.ts#L10

Is it possible to have two set of types published? @types/eyes.selenium and @types/eyes.selenium.protractor?

The workaround for the hiccup was just to add the protractor package into my automation project. A ton of bloat that is only leveraged for this one tool implementation.

Thanks for all you do! 🙇

astappiev commented 5 years ago

Should be fixed with https://github.com/applitools/Eyes.Sdk.JavaScript/commit/5f459d8f73d0b2cdbdc6592958ef68b1e103800a

I just removed protractor classes as they anyway cannot be implicitly used by a user. They are used via element and element.all globals.