I have an application in angularJs and in that I have 1 test case in protractor framework.I want to call a backend action of Java from protractor test case.How can I do that. ajax, http, jquery actions are not working I have tried the followings: 1)
$.ajax({
url : '/url',
type : 'GET/POST',
data : {
'param1' : val1,
"param2" : val2
},
success : function(json) {
console.log('success:'+json);
}
}
});
2)
$.getJSON('/url', {
"param1" : val1,
"param2" : val2
}, function(json) {
console.log('success:'+json);
});
3)
$http.get('/url', {
params : {
'param1' : val1,
'param2' : val2
}
}).success(function(data) {
console.log('success:'+json);
});
but that all are not working.
Please help me with an example thanks in advance