I'm using protractor for some of my end to end tests. We want to perform a set of actions based on which selenium node we are running on so that we avoid having some tests interfere with each other if they are running at the same time. How would I be able to get the selenium node which my selenium hub assigns for my test to run?
With the possible solution of the duplicate question i tried the following to see what testsession api would give me
browser.getSession().then(function (session) {
var hub = "http://localhost:4444"; //IP or hostname of GRID
var url = hub + "/grid/api/testsession?session=" + session.getId();
console.log(url);
});
and then while my test is running I would then hit the url manually from the browser which got printed out
http://localhost:4444/grid/api/testsession?session=17e14d0e-38da-4269-b23c-3b2d52569383
however the response I get back is
{"success":false,"msg":"Cannot find test slot running session 8ca57382-d7d8-44ae-b3bc-8c1223c86805 in the registry."}
Should I be getting the session a different way now?