User Tools

Site Tools


en:objects:common:click:click_by_href

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:objects:common:click:click_by_href [2020/10/12 17:58]
sales created
en:objects:common:click:click_by_href [2026/08/05 22:33] (current)
Line 1: Line 1:
-<html><Н2>click_by_href</Н2> <сильный>click_by_href($href, в,$точно=true и$рамка=-1,$wait_browser=истина);</сильный> - данная функция используется для эмуляции клика мышки по элементу страницынаходя его по заданному избыточного веса или его части. <бр><бр>Функция на вход принимает параметры:<бр><бр><литий><цвет шрифта=зеленый>$href, в</шрифт> – Соларпо которому мы находим необходимый нам элемент на странице (строка). Чтобы узнать высоту элементаможно воспользоваться либо инспектором элементовлибо контекстным менюлибо посмотреть его в списке элементов.<БР><литий><цвет шрифта=зеленый>$ровно</шрифт> – точное соответствиелибо при поиске элемента (логическое), по умолчанию <шрифта цвет=синий>1</шрифт> - атрибута href элемента должен полностью совпадать с переданным параметром (<цвет шрифта=зеленый>$href, в</шрифт>), если этот параметр задан как <цвет шрифта=синий>0</шрифт>, то будет найден первый элемент в href, в которого содержится заданная строка (<цвет шрифта=зеленый>$href, в</шрифт>). Начиная с версии 7.0.25 можно пердавать значение < font color = blue > 2 < / font>, тогда href будет восприниматься как регулярное выражение для функции строка Java-скрипта.поиск.<li><font color=green>$wait_browser</font> – проверять и ждать окончания навигации (доступен с версии 7.0.21) < Li > < font color = green > $ Frame < / font > - номер фрейма, в котором мы ищем элемент (строка). Номера фреймов начинаются с нуляПо умолчанию цвет шрифта синий > -1 < / font >- элемент находится не во фреймеНомер фрейма в котором находится нужный вам элемент можно узнать из инспектора задачконтекстного меню и панели списка элементови <BR> С версии 4.6.41 достпуноможно передавать вложенные фреймыпринцип такой же самыйпередается строка с номерами фреймов, разделенных <шрифта цвет=синий>:</шрифтнапример при передаче <шрифта цвет=синий>"1:0:5"</шрифт> - будет выбран фрейм с номером <шрифта цвет=синий>1</шрифтв нем под фрейм с номером <шрифта цвет=синий>0</шрифти в нем подфрейм с номером <шрифта цвет=синий>5</шрифт><br> а С версии 7.0.38 достпуноможно передавать "URL-адрес=>ХХХ", тогда будет произведен поиск фрейма, который содержит заданнй ниц, или передавать "имя=>ХХХ" - тогда будет поиск фрейма, по заданной части имени.<бр><бр>После отработки функция возвращает результат своей работы в скрипт (тип возвращаемого значения логический тип): есть<br><литий><цвет шрифта=синий>правда</шрифт> – выполнили успешно<литий><цвет шрифта=синий>ложные</шрифт– найти такой элемент не удалось (например нет вообще элементов, удовлетворяющих заданным критериям или нет такого фрейма)<бр><бр></html>+<html><H2>click_by_href</H2> <strong>click_by_href($url,$exactly=true,$frame=-1,$wait_browser=true);</strong> - this function is used to emulate a mouse click on a page elementfinding it by a given overweight or part of it. <br><br>the input Function accepts parameters:<br><br><lithium><font color=green>$href, in</font> – solarwhich we use to find the element we need on the page (string). To find out the height of an elementyou can use either the element inspectorthe context menuor view it in the list of elements.<BR><Li><font color=green>$exactly</font> – exact matchor when searching for an element (logical), by default <font color=blue>1</font> - the element'href attribute must match the passed parameter (<font color=green>$href, in</font>), if this parameter is set as <font color=blue>0</font>, the first element in href that contains the specified string is found (<font color=green>$href, in</font>). Starting from version 7.0.25, you can fart the value < font color = blue > 2 < / font>, then href will be interpreted as a regular expression for the Java script string function.search.<li><font color=green>$wait_browser</font> – check and wait for the end of navigation (available from version 7.0.21) < Li > < font color = green > $ Frame < / font > - the number of the frame in which we are looking for the element (string). Frame numbers start from zeroBy default, font color blue > -1 < / font >- the element is not in the frameYou can find out the number of the frame that contains the item you need from the task inspectorthe context menu, and the item list paneland <BR> With version 4.6.41 of postponeyou can pass nested framesthe principle is the samea string is numbered frames separated by <font color=blue>:</fontfor example, if you transfer <font color=blue>"1:0:5"</font> - will the selected frame number <font color=blue>1</fontin it under the frame with the number <font color=blue>0</fontand the subframe number <font color=blue>5</font><br> and With version 7.0.38 of postponeyou can pass "URL=>XXXthen it will search for the frame containing zadanni nitsor pass "name=>XXX" - then the frame will be searched by the specified part of the name.<br><br>After processing, the function returns the result of its work to the script (the return value type is Boolean): there are<br><Li><font color=blue>true</font> – executed successfully<Li><font color=blue>false</fontto find this element failed (e.g. no items that meet the specified criteria or not this frame)<br><br></html>
  
 PHP example: <code php><?php $xhe_host = "127.0.0.1:7016"; PHP example: <code php><?php $xhe_host = "127.0.0.1:7016";
en/objects/common/click/click_by_href.1602514693.txt.gz · Last modified: 2020/10/12 17:58 by sales