mardi 2 août 2016

protractor sendKeys sends keys in the wrong order

I am trying to test some form by adding appropriate text to my input fields, but for some reason I am not getting what I'm sending. The problem I am having is with ['name=type_input]' and sendKeys('Ciężarówka'). When I run the test the input field gets filled with letters in the wrong order, for example "kaCiężaów" or "aCiężarówk" and that causes my entire test to fail. Sometimes the order is correct and than the test passes. Can someone explain what is happening?

it('should add vehicle', function() {

      element(by.css('[name=type_input]')).sendKeys('Ciężarówka').sendKeys(protractor.Key.TAB);

   element(by.css('[name=name]')).sendKeys('Nie Super Auto 555').sendKeys(protractor.Key.TAB);

   element(by.model('model.carId')).sendKeys('54536');

   element(by.css('[name=numberPlate]')).sendKeys('KU PAA').sendKeys(protractor.Key.TAB);

   helpers.selectAnyFromKendoComboBox('vehicle', 'haulier');

   helpers.save('vehicle');

   alertify.expectSuccessMessage('Zapisano');

});

Aucun commentaire:

Enregistrer un commentaire