Added saftey to Javascript, STAMSTest-teardown calls next pageTest