get_x_in_webpage_picture

get_x_in_webpage_picture($picture_filepath,$similar_koeff=0.95,$similar_algoritm=5); - get the x coordinate of the specified image on the current page

The function accepts parameters as input:

After testing, the function returns the result of its work to the script :
  • X – X - coordinate of the specified image on the page

    PHP example: webpage->".basename(__FILE__)."
    "; //screenshot name $screen_name = "test \ kak.bmp"; if($browser->get_model() == "chromium") $screen_name = "test \ kak1.bmp"; //1 echo "1.Let's go to the site from which we have a screenshot:"; echo $browser->navigate("http://bigfozzy.com")."
    "; //2 echo "2.Get the coordinates of the picture in the browser picture:"; $x = $webpage->get_x_in_webpage_picture($screen_name); $y = $webpage->get_y_in_webpage_picture($screen_name); echo "upper left corner of picture $x x $y
    "; //3 echo "3.Move the mouse to the specified location:"; echo $mouse->move($x, $y)."
    "; sleep(7); //4 echo "4.Let's go to the site from which we have a similar screenshot:"; echo $browser->navigate("http://vk.com")."
    "; //five echo "5.Get the coordinates of the picture in the browser picture:"; $x = $webpage->get_x_in_webpage_picture($screen_name, 0.9,2); $y = $webpage->get_y_in_webpage_picture($screen_name, 0.9,2); echo "upper left corner of picture $x x $y
    "; //6 echo "6.Move the mouse to the specified location:"; echo $mouse->move($x, $y)."
    "; sleep(7); //7 echo "7.Get the coordinates of the picture in the browser picture:"; $x = $webpage->get_x_in_webpage_picture($screen_name, 0.7,3); $y = $webpage->get_y_in_webpage_picture($screen_name, 0.7,3); echo "upper left corner of picture $x x $y
    "; //8 echo "8.Move the mouse to the specified location:"; echo $mouse->move($x, $y)."
    "; //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("
    webpage.xxxxxxxxx
    ") # screenshot name screen_name = "test \ kak.bmp" if browser.get_model() == "chromium": screen_name = "test \ kak1.bmp" # 1 echo("1.Let's go to the site from which we have a screenshot:") echo(browser.navigate("http://bigfozzy.com"), "
    ") # 2 echo("2.Get the coordinates of the picture in the browser picture:") x = webpage.get_x_in_webpage_picture(screen_name) y = webpage.get_y_in_webpage_picture(screen_name) echo("upper left corner of picture" + str(x) + "x" + str(y) + "
    ") # 3 echo("3.Click on the given location:") echo(mouse.move(x, y), "
    ") # 4 echo("4.Let's go to the site from which we have a screenshot:") echo(browser.navigate("http://vk.com"), "
    ") # five echo("5.Get the coordinates of the picture in the browser picture:") x = webpage.get_x_in_webpage_picture(screen_name, 0.8,4) y = webpage.get_y_in_webpage_picture(screen_name, 0.8,4) echo("upper left corner of picture" + str(x) + "x" + str(y) + "
    ") # 6 echo("6.Click on the given location:") echo(mouse.move(x, y), "
    ") # 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:7080"; InitXHE(); app.minimize_to_tray(); //Start echo("
    webpage.get_x_in_webpage_picture
    "); //screenshot name(link Briefly) string screen_name = "test \ kak.bmp"; if(browser.get_model() == "chromium") screen_name = "test \ kak1.bmp"; //1 step echo("1.Let's go to the site, from which we have a screenshot:"); echo(browser.navigate("http://bigfozzy.com/") + "
    "); //step 2 echo("2.Get the coordinates of the picture in the browser picture:"); int x = webpage.get_x_in_webpage_picture(screen_name); int y = webpage.get_y_in_webpage_picture(screen_name); echo("upper left corner of the picture" + x + "x" + y + "
    "); //step 3 echo("3.Let's go to the given location:"); echo(mouse.move(x, y) + "
    "); sleep(2); //step 4 echo("4.Let's go to the site, from which we have a screenshot:"); echo(browser.navigate("vk.com") + "
    "); //step 5 echo("5.Get the coordinates of the picture in the browser picture:"); x = webpage.get_x_in_webpage_picture(screen_name, 0.9,0); y = webpage.get_y_in_webpage_picture(screen_name, 0.9,0); echo("upper left corner of the picture" + x + "x" + y + "
    "); //6 step echo("6.Let's go to the given location:"); echo(mouse.move(x, y) + "
    "); //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("
    webpage.get_x_in_webpage_picture
    "); //screenshot name screen_name = "test \ kak.bmp"; if(browser.get_model() == "chromium") screen_name = "test \ kak1.bmp"; //1 step echo("1.Let's go to the site, from which we have a screenshot:"); echo(browser.navigate("http://bigfozzy.com") + "
    "); //step 2 echo("2.Get the coordinates of the picture in the browser picture:"); var x = webpage.get_x_in_webpage_picture(screen_name); var y = webpage.get_y_in_webpage_picture(screen_name); echo("upper left corner of the picture" + x + "x" + y + "
    "); //step 3 echo("3.Click on the given location:"); echo(mouse.move(x, y) + "
    "); app.sleep(2); //step 4 echo("4.Let's go to the site, from which we have a screenshot:"); echo(browser.navigate("http://vk.com") + "
    "); //step 5 echo("5.Get the coordinates of the picture in the browser picture:"); var x = webpage.get_x_in_webpage_picture(screen_name, 0.7,3); var y = webpage.get_y_in_webpage_picture(screen_name, 0.7,3); echo("upper left corner of the picture" + x + "x" + y + "
    "); //step 6 echo("6.Click on the given location:"); echo(mouse.move(x, y) + "
    "); //end echo("

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