add window load listener and return assertion values