M
M
maestro072017-06-16 11:56:10
Angular
maestro07, 2017-06-16 11:56:10

How to make selenium test for angular project?

How to make selenium test for angular project? i wrote a selenium authorization test on selenium ide 2.9.1. displays an error that the fields are not filled. but they are full. I came across protractor. did a tutorial but did not see the result. can someone explain?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ozknemoy, 2017-06-17
@ozknemoy

there is nothing more to add than it is written in the docks. It looks like a fullness check occurs before a value is entered there. do you enter it like that? $('#login_username').sendKeys(vars.userName) ?
maybe my example will help to move forward

describe('под логином /', function () {
        it(`нулевого счета ${vars.userName}.(не)доступность кнопки отправить + отправка на шлюз`,function () {
            $('login-button').click();
            $('#login_username').sendKeys(vars.userName);
            $('#login_password').sendKeys(vars.password,protractor.Key.ENTER);

            // нет чекбокса внутреннего аккаунта
            expect(exist_checkboxFromCAccount()).toBe(false);
            // доступность кнопки
            expect(notLoginOuterButton.getAttribute('disabled')).toBe(null);
            // иду на шлюз/отправляю значения инпутов
            notLoginOuterButton.click();
            browser.getCurrentUrl().then(function (url) {
                // url должен содержать адрес шлюза а не локальный
                //  он должен содержать и адрес возврата
                expect(/secure\.onpay\.ru/i.test(url) && !/localhost/i.test(url)).toBe(true);
            });
        });
    });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question