humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
Changelog
get_rows_count_by_number
get_rows_count_by_number($number,$frame="-1"); - ,:
:
<?php // Scenario: Get the number of rows in a table using XHETable class // Description: Demonstrates how to find a table by its number and retrieve the total count of rows // Classes used: DOM, XHETable, XHEBrowser, XHEApplication // Step: Connection to XHE API $xhe_host = getenv("RPABOT_HOST_URL"); // Step: Path to init.php file if (!isset($path)) { // Path to init.php file for connecting to XHE API $path = "../../../Templates/init.php"; // Step: When connecting init.php file, all functionality of classes for working with XHE API will be available require($path); } // Step: Go to the polygon page if the page was not loaded earlier WEB::$browser->navigate(TEST_POLYGON_URL . "table.html"); echo "=== Example of using get_rows_count_by_number ===\n\n"; // Example 1: Get number of rows in the first table echo "Example 1: Get number of rows in the first table\n\n"; // Step: Define arguments for get_rows_count_by_number $tableNumber1 = 0; $row_count = DOM::$table->get_rows_count_by_number($tableNumber1); echo "Number of rows in table $tableNumber1: " . $row_count . "\n\n"; // Example 2: Get number of rows in the second table echo "Example 2: Get number of rows in the second table\n\n"; // Step: Define arguments for get_rows_count_by_number $tableNumber2 = 1; $row_count_2nd = DOM::$table->get_rows_count_by_number($tableNumber2); echo "Number of rows in table $tableNumber2: " . $row_count_2nd . "\n\n"; // Example 3: Get number of rows in table in frame echo "Example 3: Get number of rows in table in frame\n\n"; // Step: Define arguments for get_rows_count_by_number $tableNumber3 = 0; $frame3 = "0"; // Frame 0 $row_count_frame = DOM::$table->get_rows_count_by_number($tableNumber3, $frame3); echo "Number of rows in table $tableNumber3 in frame $frame3: " . $row_count_frame . "\n\n"; // Example 4: Get number of rows in nested frames echo "Example 4: Get number of rows in nested frames\n\n"; // Step: Define arguments for get_rows_count_by_number $tableNumber4 = 0; $frame4 = "1:2:3"; // Nested frames $row_count_nested = DOM::$table->get_rows_count_by_number($tableNumber4, $frame4); echo "Number of rows in table $tableNumber4 in nested frames $frame4: " . $row_count_nested . "\n\n"; echo "\n"; echo "All get_rows_count_by_number examples completed!\n"; // Step: Stop work WINDOW::$app->quit(); ?>
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7013" from xweb_human_emulator import * # echo("<hr><font color=blue>table.get_rows_count_by_number</font><hr>") # 1 echo("1. : ") echo(browser.navigate("https://rpa-bot.ru/wiki/poligon/table.html"),"<br>") # 2 echo("2. 0 : ") echo(table.get_rows_count_by_number(0),"<br>") # 3 echo("3. : ") if table.get_rows_count_by_number(100500)==-1: echo(" <br>") # 4 echo("4. 0 : ") echo(table.get_rows_count_by_number(0,0),"<br>") # 5 echo("5. : ") if table.get_rows_count_by_number(100500,0)==-1: echo(" <br>") # 6 echo("6. : ") if table.get_rows_count_by_number(0,5)==-1: echo(" <br>") # echo("<hr><br>") # Quit app.quit()
#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 = Environment.GetEnvironmentVariable("RPABOT_HOST_URL"); InitXHE(); // echo("<hr><font color=blue>table.get_rows_count_by_number</font><hr>"); // 1 echo("1. : "); echo(browser.navigate("rpa-bot.ru/wiki/poligon/table.html")+"<br>"); // 2 echo("2. 0 : "); echo(table.get_rows_count_by_number(0)+"<br>"); // 3 echo("3. : "); if (table.get_rows_count_by_number(100500)==-1) echo(" <br>"); // 4 echo("4. 0 : "); echo(table.get_rows_count_by_number(0,"0")+"<br>"); // 5 echo("5. : "); if (table.get_rows_count_by_number(100500,"0")==-1) echo(" <br>"); // 6 echo("6. : "); if (table.get_rows_count_by_number(0,"5")==-1) echo(" <br>"); // echo("\n\n"); app.quit(); } }
// , xhe_host="127.0.0.1:7010"; echo=require("../../../Templates JS/init.js"); // echo("<hr><font color=blue>table.get_rows_count_by_number</font><hr>"); // 1 echo("1. : "); echo(browser.navigate("https://rpa-bot.ru/wiki/poligon/table.html")+"<br>"); // 2 echo("2. 0 : "); echo(table.get_rows_count_by_number(0)+"<br>"); // 3 echo("3. : "); if (table.get_rows_count_by_number(100500)==-1) echo(" <br>"); // 4 echo("4. 0 : "); echo(table.get_rows_count_by_number(0,0)+"<br>"); // 5 echo("5. : "); if (table.get_rows_count_by_number(100500,0)==-1) echo(" <br>"); // 6 echo("6. : "); if (table.get_rows_count_by_number(0,5)==-1) echo(" <br>"); // Quit app.quit();
=============================================
Table DOM System Vision Web Window
=============================================
- , .