Answers for "how to use backspace in protractor"

0

how to use backspace in protractor

describe('backspace', function() {
    it('types some stuff and backspaces one character', function() {
        element(by.model('invoice.customerName')).sendKeys('Ali Khoda');

        element(by.model('invoice.customerName')).sendKeys(protractor.Key.BACK_SPACE);

        expect(element(by.model('invoice.customerName')).getText()).toBe('Ali Khod');

    });
});
Posted by: Guest on July-20-2020
0

how to use backspace in protractor

describe('backspace', function() {
    it('types some stuff and backspaces one character', function() {
        element(by.model('invoice.customerName')).sendKeys('Ali Khoda').then(function() {

            element(by.model('invoice.customerName')).sendKeys(protractor.Key.BACK_SPACE).then(function() {

                expect(element(by.model('invoice.customerName')).getText()).toBe('Ali Khod');

            });

        });

    });
});
Posted by: Guest on July-20-2020

Code answers related to "how to use backspace in protractor"

Browse Popular Code Answers by Language