Is element enabled Version 17 (Java)
Action group: Browsers
Description
The action checks if the element exists on the page when the timeout expires.
Action icon
Settings of parameters
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Контекст | Контекст действия для работы с браузером. | Robin.Selenium | Контекст браузера | Да |
Элемент | Элемент для взаимодействия | Robin.WebElement | Да | |
Видимый | Если значение параметра равно true, то проверять видимость элемента. | Robin.Boolean | true | Нет |
Доступный | Если значение параметра равно true, то проверять доступность элемента. | Robin.Boolean | true | Нет |
Тайм-аут | Время ожидания выполнения действия (мс). Значение конвертируется в секунды: оно делится на 1000 и округляется в большую сторону. | Robin.Numeric | Нет | |
Результаты | ||||
Результат | Переменная с общим результатом проверки состояния элемента. Значение равно true, если результаты всех проверок, задаваемых параметрами действия, оказались успешными. Если хотя бы одна проверка закончилась неуспешно, то общий результат будет false. | Robin.Boolean | true |
Special conditions of use
A visible and enabled element is clickable.
Example of use
Task
Follow the link https://wiki.rpa-robin.ru/Eng/index.html and check if the element is visible and enabled. If the element is found, click on it.
Solution
Use the "Open Browser", "Is element enabled", "If", "Send Click" actions.
Implementation
- Assemble a robot scheme with the actions.
- Set the "Open Browser" action parameters.
- Set the "Is element enabled" action parameters. To create an element use the WebSpy tool (see section Create Web-element).
- Set the "If" action parameters.
- Set the "Send Click" action parameters.
- Click "Start" in the top panel.
Result
The program robot completed successfully. The element is visible and enabled.