Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Cannot read property 'prototype' of undefined (Protractor 4 upgrade problem) #3377

@alecxe

Description

@alecxe

After upgrading to Protractor 4.0.0, we are starting to see out tests failing immediately in onPrepare() with:

Error: TypeError: Cannot read property 'prototype' of undefined

failing on the following line:

protractor.ElementArrayFinder.prototype.takewhile = function(whileFn) {
   // ...
};

(here we are adding takewhile - linking #2521)

Looks like ElementArrayFinder is no longer exposed on the protractor global object.

How can we extend ElementArrayFinder in Protractor 4? Thanks!

SO reference: http://stackoverflow.com/questions/38380465/cannot-read-property-prototype-of-undefined-after-upgrading-to-protractor-4.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions