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

Protractor seem to ignore debouce settings while executing sendKey command #1671

Closed
vbaibus opened this issue Dec 29, 2014 · 7 comments
Closed

Comments

@vbaibus
Copy link

vbaibus commented Dec 29, 2014

Hi,
We noticed that protractor does not works correctly in case of debounce property is setup in ng-model-options of the control like below:

     <div class="input-group">
         <input id="email" type="text" inputmode="email" ng-model="user.email" name="uEmail" required class="form_control std-rounded" placeholder="email address"
     ng-model-options="{ debounce: 10000 }" ng-focus="focus('email');">
     </div>

     <div class="input-group">
         <input id="password" novalidate ng-minlength="6" type="password" inputmode="paidessword" name="uPassword" ng-model="user.password" required class="form_control std-rounded" placeholder="password"
        ng-model-options="{ debounce: 10000 }" ng-focus="focus('password');">
         ng-focus="focus('password');">
     </div>

When you run something like this:

var txtEmail = element(by.model('user.email'));
var txtPassword = element(by.model('user.password'));
var btnSignIn = element(by.buttonText('Sign In'));
...
txtEmail.sendKeys("[email protected]");
txtPassword.sendKeys("qqqqq");
btnSignIn.click();

....click will be performed prior to txtPassword field will be populated.

@ryanhart2
Copy link

You have ng-minlength="6" on your password input field, but are sending a password that is only 5 characters long. As a result, the model value is expected to be undefined.

@juliemr
Copy link
Member

juliemr commented Apr 16, 2015

Thanks @ryanhart2 for taking a look! I think we can close this then.

@juliemr juliemr closed this as completed Apr 16, 2015
@mohitjee15
Copy link

@juliemr Even I am facing similar issue.
I have a input box
<input type="text" id="select" ng-model-options="{ debounce: 1000 }" ng-model="selectedItem.displayText" >
This input is acting as a filter for a ng-repeat.

But since protractor is not respecting the debounce setting, I am getting incorrect list for the ng-repeat in my test.

@felixzapata
Copy link

Hi, I have the same problem. Due to accessibility and to inform the user the number of items filtered, I have added a debounce in the phonecat project but after that, the e2e do not work.

@mohitjee15
Copy link

mohitjee15 commented May 31, 2016

@felixzapata Hi felix for the time being I have fixed the issue using browser.sleep

beforeEach(function () {
    CHF.multiselect.input(0).sendKeys('w');
    browser.sleep(700);
});

@felixzapata
Copy link

hi @mohitjee15 , thanks but it is not valid for me

@felixzapata
Copy link

Nevermind, After a review, I think that my problem is related with another issue in my code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants