Bug 1035133 - [TestAgent] Check that the TestAgent object is here and di...+shepherd

...splay an error message otherwise r=yurenju
it was not necessary to change the "stylesheet" function but I thought it was better for consistency