Hi,
I have the following url below, but for my test i want to click on it and check if the url has Global Admin as a User Role.
API1 =
Click on the link (which is always changing after every send)
and verify once you send the url - User Role = Global Admin …
I want to be able to do this in the test scripts of the first api call … is this possible?
I am already sending the request for that url and it is coming up as pass, but what would be next…
postman.setEnvironmentVariable("UserAdminUrl", pm.response.text());
var UserAdminUrl = pm.environment.get("UserAdminUrl");
pm.test("Expecting Response to have text Url",function (){
pm.expect(pm.response.text()).to.include(UserAdminUrl);
});
pm.test("UserAdminUrl hits the server successfully", function () {
pm.sendRequest(UserAdminUrl, function (err,response){
pm.expect(err).to.not.be.ok;
pm.expect(response).to.have.property('code', 200);
pm.expect(response).to.have.property('status', 'OK');
});
});