im trying post api using registration page , have used $http request post data
it('login page patient dashboard existing email , password', function() { console.log('entering login page') browser.get('http://localhost:9000/login.html'); browser.executescript(function(callback) { var $http; $http = angular.injector(["ng"]).get("$http"); console.log('http request') return $http({ url: "http://int.eclinic247.com/reg/create-patient", method: "post", data: {"firstname":"jya","lastname":"raq"}, datatype: "json" }).success(function() { return callback([true]); console.log('done') }).error(function(data, status) { return callback([false, data, status]); console.log('oops not done!!!!') }); }) element(by.model(objects.locators.passwordbox)).sendkeys(objects.login.password);
i see executescript block doesnot run , there no errors too...and test case passes
is way post http request using protractor...please suggest me proper post data back-end directly
any appreciated...thanks in advance
Comments
Post a Comment