User Tools

Site Tools


Sidebar



en:objects:browser:tabs:enable_isolate_tabs

enable_isolate_tabs

enable_isolate_tabs($enable=true); - enable or disable the "Isolated browsers in bookmarks"setting. This setting allows you to create browsers in each tab with separate settings, including cookies, proxy, user agent strings, navigator parameters, etc.

the Function accepts parameters as input:

  • $enable - specifies to disable (false) or enable (true) the "Isolated browsers in bookmarks"setting.

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

    PHP example:

    <?php $xhe_host = "127.0.0.1:7010";
     
    //connect the object to control the emulator, if not already connected
    if(!isset($path))
      $path = "../../../Templates/xweb_human_emulator.php";
    require($path);
     
    //Start
    echo "<hr> <font color = blue> browser->".basename(__FILE__)."</font> <hr>";
     
    //1
    echo "1.Let's switch to isolated bookmarks mode:";
    echo $browser->enable_isolate_tabs(true)." n";
     
    //2
    echo "2.Let's set 2 bookmarks:";
    echo $browser->set_count(2)." n";
     
    //3
    echo "3.Let's set the parameters of the 1st tab:";
    echo $browser->set_active_browser(0)."";
    echo $browser->set_screen_resolution(800,600,16)."";
    echo $browser->set_language("en")." n";
     
    //4
    echo "4.Let's set the parameters of the 2 tabs:";
    echo $browser->set_active_browser(1)."";
    echo $browser->set_screen_resolution(1024,768,24)."";
    echo $browser->set_language("ru")." n";
     
    //five
    echo "5.Let's see the results:";
    echo $browser->navigate("http://www.whoer.net")."";
    echo $browser->set_active_browser(0)."";
    echo $browser->navigate("http://www.whoer.net")." n";
     
    //end
    echo "<hr> <br>";
     
    //Quit
    $app->quit();
    ?>

    Python example:

    # Additional paths
    import sys
    sys.path.insert(0, '../../../Templates PY/')
     
    xhe_host = "127.0.0.1:7010"
    from xweb_human_emulator import *
     
    # Start
    echo("<hr> <font color = blue> browser.enable_web_socket </font> <hr>")
     
    # 1
    echo("1.Let's set 2 bookmarks:");
    echo(browser.set_count(2), "
    ");
     
    # 2
    echo("2.Let's switch to isolated bookmarks mode:");
    echo(browser.enable_isolate_tabs(true), "
    ");
     
    # 3
    echo("3.Let's set the parameters of 1 bookmark:");
    echo(browser.set_active_browser(0), "");
    echo(browser.set_screen_resolution(800,600,16), "");
    echo(browser.set_language("en"), "
    ");
     
    # 4
    echo("4.Let's set the parameters of the 2 tabs:");
    echo(browser.set_active_browser(1), "");
    echo(browser.set_screen_resolution(1024,768,24), "");
    echo(browser.set_language("ru"), "
    ");
     
    # five
    echo("5.Let's see the results:");
    echo(browser.navigate("http://www.whoer.net"), "");
    echo(browser.set_active_browser(0), "");
    echo(browser.navigate("http://www.whoer.net"), "
    ");
     
    # end
    echo("<hr> <br>")
     
    # 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:705";
    InitXHE();
     
    //Start
    echo("<hr> <font color = blue> browser.enable_cache </font> <hr>");
     
               //1
                echo("1.Let's set 2 bookmarks:");
                echo(browser.set_count(2) + " n");
     
               //2
                echo("2.Let's switch to isolated bookmarks mode:");
                echo(browser.enable_isolate_tabs(true) + " n");
     
               //3
                echo("3.Let's set the parameters of the 1st tab:");
                echo(browser.set_active_browser(0) + "");
                echo(browser.set_screen_resolution(800,600,16) + "");
                echo(browser.set_language("en") + " n");
     
               //4
                echo("4.Let's set the parameters of the 2 tabs:");
                echo(browser.set_active_browser(1) + "");
                echo(browser.set_screen_resolution(1024,768,24) + "");
                echo(browser.set_language("ru") + " n");
     
               //five
                echo("5.Let's see the results:");
                echo(browser.navigate("http://www.whoer.net") + "");
                echo(browser.set_active_browser(0) + "");
                echo(browser.navigate("http://www.whoer.net") + " n");
     
    //end
    echo("<hr> <br>");
     
    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("<hr> <font color = blue> browser.is_enable_cache </font> <hr>");
     
    //1
    echo("1.Let's set 2 bookmarks:");
    echo(browser.set_count(2) + " n");
     
    //2
    echo("2.Let's switch to isolated bookmarks mode:");
    echo(browser.enable_isolate_tabs(true) + " n");
     
    //3
    echo("3.Let's set the parameters of the 1st tab:");
    echo(browser.set_active_browser(0) + "");
    echo(browser.set_screen_resolution(800,600,16) + "");
    echo(browser.set_language("en") + " n");
     
    //4
    echo("4.Let's set the parameters of the 2 tabs:");
    echo(browser.set_active_browser(1) + "");
    echo(browser.set_screen_resolution(1024,768,24) + "");
    echo(browser.set_language("ru") + " n");
     
    //five
    echo("5.Let's see the results:");
    echo(browser.navigate("http://www.whoer.net") + "");
    echo(browser.set_active_browser(0) + "");
    echo(browser.navigate("http://www.whoer.net") + " n");
     
    //end
    echo("<hr> <br>");
     
    //Quit
    app.quit();
  • en/objects/browser/tabs/enable_isolate_tabs.txt · Last modified: 2026/08/05 22:33 (external edit)