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.

sendKeys() only passes partial value #2019

Closed
@rschoenbichler

Description

@rschoenbichler

After upgrading to protractor 2.0 my login tests started failing.

In my PO I use the following function to handle input values:

    function _input(parentElement, binding, value) {
        var field = parentElement.element(by.model(binding)).element(by.css("input"));
        if (value === undefined)
            return field.getAttribute('value');
        else
            return field.clear().then(function() {
                return field.sendKeys(value);
            });
    }

I found out that sendKeys only passes the first part of the value (always with a different length, sometimes one character sometimes n-1). Even if I make a conditional wait for the input to contain the whole value, the condition never gets fullfilled. It seems like sendKeys randomly stops sending keys from the value.

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