Thursday, February 10, 2011

Remote work with the Human Emulator.

Not all users of Human Emulator aware of the fact that the control program can be made remote. That is, Human Emulator stands at some server, and you are from a browser or from the php scripts on your computer can run a human scripts. Or, Human Emulator sofware stands on one computer of the local network at the office , but you can from your laptop to manage this Human Emulator. In this case, all actions for the server and network are the same.

Assume that Human Emulator stands on server with ip 93.95.108.1 on port 7010. The program is open and ready for work.

The easiest way, requiring no further action is to call the commands from your browser. Just take, and type in the browser so that's a line http://93.95.108.1:7010/Browser.Navigate?url=google.ru Human Emulator on the server magically went to google.com. If you enter the following commands:
http://93.95.108.1:7010/Browser.Navigate?url=http% 3A% 2F% 2Fgoogle.com & use_cache = 1
http://93.95.108.1:7010/Input.SetValueByName?name=q&value=human
http://93.95.108.1:7010/InputButton.ClickByNumber?number=0

a Human Emulator on the server goes to google.com in the search box to add the word human and clicks on the search button.

In the script of Human these lines will look like this:

$browser->navigate('http://google.com');
$input->set_value_by_name('q',"human".$i);
$button->click_by_number(0);


In order that would in the usual form to get the team to enter the browser enough to open the information panel (View) and a script run.

The second method requires the installation program templates Human Emulator on the computer from which the remote control. To do this, just enough to where you copy a folder from the Templates folder of Human Emulator. Next from the command line php script executes the following code:

<?php
$xhe_host ="93.95.108.1:7010";
// The following code is required to properly run XWeb Human Emulatorrequire("../Templates/xweb_human_emulator.php");
$browser->navigate('http://google.com');
// wait on browser
$browser->wait_for(30,1);
for($i;$i<?50;$i++)
{
$browser->navigate('http://google.com');
// wait on browser
$browser->wait_for(30,1);
$input->set_value_by_name('q',"human".$i);
$button->click_by_number(0);
// wait on browser
$browser->wait_for(30,1);
echo $i."";
// go to blank page
$browser->navigate('about:blank');
// wait on browser
$browser->wait_for(30,1);
}
// Quit
$app->quit();
?>

And on the server Human software execute this script.

Another way to manage remotely, is to add script Human Emulator in the pages of your site and the user pressing any elements can run this script and execute it Human Emulator.

And the last way to remote control it's startup scripts in human software, which stands on PC, and these scripts will be executed on the server. It's enough to be set in the beginning of the script string $ xhe_host = "93.95.108.1:7010"; as in the example script above.

No comments:

Post a Comment