navigate

navigate($url,$use_cache=true,$use_wait=true); - go to the specified url (perform navigation)

the input Function accepts parameters:

  • $url – the address of the page in the Internet that you need to click on. In addition to regular addresses, the following are supported URI abbreviations:
        about:blank - show an empty page
        about:home - show a stratum page
        about:inprivate (IE8+) - operation mode - private
       & nbsp; & nbsp;about:tabs (IE7+) - page "quick access to frequently visited sites"
        about:noadd-ons (IE7+) - operation - no add-ons
        about:noadd-onsinfo (IE7+) page "As a browser add-ons affect viewing web pages?"
        about:desktopitemnavigationfailure to show the page "navigation on local resource has failed"
        about:navigationcanceled - show the page of "navigation canceled"
        about:navigationfailure to show the page "navigation failed"
        about:offlineinformation page "navigation to the webpage was canceled" .
        about:postnotcached page "Web page expired"
        about:securityrisk page "Your security level does not allow you to protect your computer"
  • $use_cache – whether to use cache
  • $use_wait – whether to wait for navigation to end according to waiting parameters

    After testing, the function returns the result of its work to the script :
  • true – completed successfully
  • false – failed

    PHP example: browser->".basename(__FILE__)."
    "; //go to yahu echo $browser->navigate("http://yahoo.com"); echo $browser->navigate("about: blank"); //go to a non-existent site if(!$browser->navigate("http://t", false)) echo "failed to visit the site:".$browser->get_last_navigation_error(); //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
    ") # go to yahu browser.navigate("http://yahoo.com") browser.navigate("about: blank") # go to yahu(longer) if not browser.navigate("http://tttt"): echo("navigation failed:" + browser.get_last_navigation_error()) # 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:7013"; InitXHE(); //Start echo("
    browser.navigate
    "); //1 step echo("1.Let's go to yahu:"); echo(browser.navigate("http://yahoo.com") + "
    "); //step 2 echo("2.Let's go to a blank page:"); echo(browser.navigate("about: balnk") + "
    "); //step 3 echo("3.Let's go to a non-existent site:"); if(!browser.navigate("http://ttttt")) echo("navigation failed:" + browser.get_last_navigation_error()); //end echo("

    "); app.quit(); } }
    Java Script example: //connect the object to control the emulator, if not already connected xhe_host = "127.0.0.1:7013"; echo = require("../../../Templates JS/xweb_human_emulator.js"); //Start echo("
    browser.navigate
    "); //1 step echo("1.Let's go to yahu:"); echo(browser.navigate("http://yahoo.com") + "
    "); //step 2 echo("2.Let's go to about: blank:"); echo(browser.navigate("about: blank") + " n"); //step 3 echo("3.Let's go to a non-existent address:"); if(!browser.navigate("http://tttt")) echo("navigation failed:" + browser.get_last_navigation_error()); //end echo("

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