Zadcplbm6C Posted December 23, 2017 Posted December 23, 2017 Why does IEBodyReadHTML return the source code before instead of after the login? The automatic login works in the Internet Explorer. $oIE = _IECreate("confidential") _IELoadWait($oIE) $oUsername = _IEGetObjByName($oIE, "username") _IEFormElementSetValue($oUsername, $sUsername) $oPassword = _IEGetObjByName($oIE, "password") _IEFormElementSetValue($oPassword, $sPassword) $oLoginButton = _IEGetObjByName($oIE, "login_submit") _IEAction($oLoginButton, "click") _IELoadWait($oIE) $sHTML = _IEBodyReadHTML($oIE) expandcollapse popup<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="fsg.css"> <script type="text/javascript"> function doRefresh() { if (document.getElementById('quiz-form')) { doSubmitQuizForm(); } else { document.getElementById('refresh-form').submit(); } } </script> <title>Survey title</title> </head> <body> <div class="center"> <div id="layoutwrapper1"> <div id="layoutwrapper2"> <div id="logobox"> <img src="logo.jpg" alt="" height="100" width="1000"> </div> <div id="topbox"> </div> <div id="menubox"> <div id="mainmenu"> <p>Server time at page load:<br> <span class="message"> 2017-12-23 17:00:00 HOMCET </span> </p> </div> <div id="searchbox"> </div> </div> <form action="index.php" method="post"> <table> <tbody> <tr> <th> <label for="user">Username:</label> </th> <td> <input id="username" name="username" type="text"> </td> </tr> <tr> <th> <label for="password">Password:</label> </th> <td> <input id="password" name="password" value="" type="password"> </td> </tr> <tr> <td> </td> <td> <input name="login_submit" value="Login" type="submit"> </td> </tr> </tbody> </table> </form> <p> Survey starts at <span class="message"> 2017-12-23 17:00:00 HOMCET </span> </p> <p> <b> best retailers: </b> <br> <a href="./statistics.php">statistics</a> </p> </body> </html>
Danp2 Posted December 23, 2017 Posted December 23, 2017 Does it help if you use _IEAttach after login and before the _IEBodyReadHTML? Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now