extract method getIframePagePath and simplification.