angular / protractor

E2E test framework for Angular apps
http://www.protractortest.org
MIT License
8.75k stars 2.31k forks source link

TypeScript - Incorrect type signature of ElementArrayFinder::getText #3818

Open jan-molak opened 7 years ago

jan-molak commented 7 years ago

Hi there!

It seems to me that the automatic application of the ElementFinder-specific WEB_ELEMENT_FUNCTIONS to the ElementArrayFinder results in an incorrect type signature of the ElementArrayFinder::getText().

Instead of declaring a thenable containing a list of strings, the signature describes a thenable containing a single string.

This gives both the IDE and the compiler a bit of a hard time:

screen shot 2016-12-13 at 01 40 49

Please let me know should you need any additional information!

Best, Jan

seanmay commented 7 years ago

This is proving to not be easy; not in a way that doesn't cause other issues, at least. Even manually implementing methods as a proxy, rather than using dynamic assignment leads to compiler complaints.

I am elbow-deep in this, at the moment, so anything else you have hit, specifically relating to this problem, @jan-molak, would be a welcome addition.

jan-molak commented 7 years ago

Sure, happy to help. Do you have some branch we could look at together?

seanmay commented 7 years ago

I've got a couple of them that diverge; I'll get you links for them once I pick a winner and put it in a stable state. Probably later tonight.

Part of the conflict that I run into is actually the non-compatible different Promise interfaces, woven throughout the system.

jan-molak commented 7 years ago

This one is also related to the area you're working on I think: #4049

manolan1 commented 5 years ago

Is this really still not fixed? More than 2 years later?

Is there a plan to fix it? Perhaps it would be easier after upgrading to a more recent WebDriverJS without the Promise Manager.