селен не мог получить pagasource - PullRequest
0 голосов
/ 02 мая 2019
    *

 - IWebElement iframe = WebDriver.FindElement(By.Id("pwd_iframe"));
                   WebDriver.SwitchTo().Frame(iframe);
                   var userNameTextbox = WaitDriver.Until(ExpectedConditions.ElementIsVisible(By.Id("logonCard")));
                   userNameTextbox.SendKeys("xxxxxx");
                   Thread.Sleep(20000);
                   var loginElement = WaitDriver.Until(ExpectedConditions.ElementToBeClickable(By.Id("submitkey")));
                   loginElement.Click();

*

when i login in the website, the click event post ,and  response context is like 
1、when <script language='JavaScript'>
    var screenWidth = window.screen.width;
    var screenHeight = window.screen.height;

    function changeScreen() {
        window.frames['topFrame'].document.location.href = '/ebankc/newnormalbank/include/EBANKPtop.jsp?dse_sessionId=IUJDEZGZAIALBSIEBHHODCDGFRIHDQCCDNIHHFHT' + '&screenWidth=' + screenWidth + '&screenHeight=' + screenHeight;
    }
</script>
<frameset rows="109,*" border="0" framespacing="0" cols="*" frameborder="NO" onload="changeScreen();">
    <frame name="topFrame" scrolling="AUTO"  marginwidth="0" marginheight="0" noresize>
    <frame name="downFrame" scrolling="AUTO" marginwidth="0" marginheight="0" noresize>
    <noframes>
        <body bgcolor="#FFFFFF" text="#000000">
        </body>
    </noframes>
</frameset>

</html>

2\ From 1,  the site redirect to "https://...........EBANKPtop.jsp?dse_sessionId=IUJDEZGZAIALBSIEBHHODCDGFRIHDQCCDNIHHFHT' + '&screenWidth=' + screenWidth + '&screenHeight=' + screenHeight;"

WebDriver  cann't  capture  the 2's pagesoure 2.  i monitor the pagesource value is empty.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...