Protractor: TypeScript - Incorrect type signature of ElementArrayFinder::getText

Created on 13 Dec 2016  路  5Comments  路  Source: angular/protractor

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

easy untriaged bug

Most helpful comment

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.

All 5 comments

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.

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

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.

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

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.

Was this page helpful?
0 / 5 - 0 ratings