get_ready_state

get_ready_state(); - get the ready state of the active browser

After testing, the function returns the result of its work to the script :
  • ready state – string, hundredth of readiness - can have the following :

         READYSTATE_UNINITIALIZED - not initialized
        readystate_loading - loaded
        & nbsp;readystate_loaded - loaded
        READYSTATE_INTERACTIVE are the starting
        READYSTATE_COMPLETE - the browser is ready
        false - the state of readiness could not be obtained

    PHP example: browser->".basename(__FILE__)."
    "; //set the mode - no waiting $browser->set_wait_params(0,0); //1 echo("1.Let's go to yahoo:"); echo($browser->navigate("yahoo.com")." n"); $rstate = ""; $oldstate = ""; //2 echo("2.Display ready states: n n"); $num = 0; while(true) { $rstate = $browser->get_ready_state(); $num ++; if($rstate!= $oldstate) { $oldstate = $rstate; echo "$rstate: $num n"; $num = 0; } if($num> 1000) break; } //end echo "

    "; //Quit $app->quit(); ?>
    Python example: # Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7013" from xweb_human_emulator import * # Start echo("
    browser.xxxxxxxxx
    ") # set the mode - no waiting browser.set_wait_params(0,0) # 1 echo("1.Let's go to yahoo:") echo(browser.navigate("yahoo.com"), " ") rstate = "" oldstate = "" # 2 echo("2.Display ready states: ") while(true): rstate = browser.get_ready_state() if rstate!= oldstate: oldstate = rstate echo(rstate) # end echo("

    ") # Quit app.quit()
    C# example: #region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program: XHEScript { static void Main(string [] args) { //init XHE server = "127.0.0.1:7010"; InitXHE(); //Start echo("
    browser.get_ready_state
    "); //go browser.set_wait_params(0,0); browser.navigate("yahoo.com"); //click and navigate by site string rstate = ""; string oldstate = ""; while(true) { rstate = browser.get_ready_state() + "
    "; if(rstate!= oldstate) { oldstate = rstate; echo(rstate); } } //end echo("

    "); app.quit(); } }
    Java Script example: //connect the object to control the emulator, if not already connected xhe_host = "127.0.0.1:7010"; echo = require("../../../Templates JS/xweb_human_emulator.js"); //Start echo("
    browser.get_ready_state
    "); //set the mode - no waiting browser.set_wait_params(0,0); //1 step echo("1.Let's go to yahoo:"); echo(browser.navigate("yahoo.com") + " n"); var rstate = ""; var oldstate = ""; //step 2 echo("2.Display ready states: n n"); while(true) { rstate = browser.get_ready_state() + "
    "; if(rstate!= oldstate) { oldstate = rstate; echo(rstate); } } //end echo("

    "); //Quit app.quit();