Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Precondition: a win-element is created.

Image Modified

  1. Place the «Replace matches» action on the workspace. In the «Text» field, specify the win-element and its "Order" property (File.Definition).

  2. Place the «Window focus element» action on the workspace. Fill in the fields. Event type - left-click. In the "Element" field, specify the element that was modified (File).

Image Modified

Result: the robot clicked on the element whose order was changed.

Let’s consider other examples described in the table below: *ожидание перевода*

Предусловие
Открыто приложение "Блокнот"
Image Removed

Prerequisite:

  • Открыт или создан новый робот
    1. A new robot is opened or created

    2. Notepad application is opened
      Image Added


    Действие

    Action

    Ожидаемый результат

    Expected result

    1

    Запустить win
    1. Start Win-

    шпион
    1. Spy

    Image Removed
    1. Image Added

    Захватить win
    1. Capture Win-

    элемент
    1. element

    Image Removed
  • Настроить свойства элемента так, чтобы по свойствам было найдено более одного элемента
    Например, захватить элемент меню в блокноте и оставить только одно свойство:
    Image Removed
    1. Шпион запущен
    2. Элемент захвачен, отображаются свойства элемента
    3. Свойства настроены, данным свойствам соответствует 6 элементов
    2

    Order в шпионе

    1. Оставить "Порядок"=0 и нажать "Найти"
    2. Указать "Порядок"=2 и нажать "Найти"
    3. Указать "Порядок"=6 и нажать "Найти"
    4. Нажать "Сохранить" в шпионе
    5. Сохранить win-элемент
  • Найдено 6 элементов, все элементы меню подсвечены красной рамкой
    Image Removed
    1. Image Added

    2. Customize the properties of the element so that more than one element can be found by the properties. For example, capture a menu item in notepad and leave only one property:

      Image Added

    1. Spy is launched

    2. Item is captured, item properties are displayed

    3. Properties are configured, 6 items correspond to these properties

    2

    Order in the spy

    1. Set "Order"=0 and press "Find"

    2. Set "Order"=2 and press "Find"

    3. Set "Order"=6 and click "Find"

    4. Click "Save" in the spy

    5. Save win element

    1. 6 items found, all menu items are highlighted with a red frame

      Image Added

    2. Found and highlighted one item - "File" button

      Image Added

    3. Found and highlighted one item - "Help" button

      Image Added

    4. The Spy is closed, the Win-element now lacks the Order field separately, and the Definition field is filled in as follows

  • Найден и подсвечен один элемент - кнопка "Файл"
    Image Removed
  • Найден и подсвечен один элемент - кнопка "Справка"
    Image Removed
  • Шпион закрывается, в win-элементе теперь отсутствует отдельно поле Order, а поле Definition заполнено так
    1. :

      {
      "30004": "

    элемент меню
    1. menu item",
      "order": "6"
      }

    2. Win-

    элемент сохранен (с названием "элемент меню
    1. element is saved (with the name "menu item")

    3

    Запуск действия

    1. Добавить в робота действие "Получить текст элемента" (работа с win-элементами)
      Image Removed
    2. В действии "Получить текст элемента" указать только что созданный win-элемент
      Image Removed
    3. Запустить робота
    1. Действие добавлено
    2. Элемент указан
    3. Действие отрабатывает успешно, в результате - Справка

    Launch action

    1. Add the "Get element text" action to the robot (interaction with Win-elements)

      Image Added

    2. In the "Get element text" action, specify the newly created win-element.

      Image Added

    3. Start the robot

    1. Action is added

    2. Element is specified

    3. The action is successful, as a result - Help

    4

    Change order in Definition

    1. Add to the robot the "Replace matches" action, group "Text" (before the "Get element text" action)

      Image Added

    2. In the "Text" field, specify Win-element.Definition (in this case "menu item.Definition")

    3. In the "Replace" field, specify

    4

    Изменение order в Definition

  • Добавить в робота действие "Заменить совпадения", группа "Текст" (перед действием "Получить текст элемента")
    Image Removed
  • В поле "Текст" указать Win-элемент.Definition (в данном случае "элемент меню.Definition")
    В поле "Заменить" указать 
    1. "order": "6"

    В поле
    1. In the "

    На
    1. To"

    указать 
    1. field, specify "order": "2"

    Сохранить результат в "элемент меню
    1. Save the result in "menu item.Definition"

  • В действии "Получить текст элемента" по-прежнему указан созданный на шаге 2 элемент
  • Запустить робота
  • Открыть win-элемент
    1. Действие добавлено
    2. Параметры заполнены
    3. В действии "Получить текст элемента" по-прежнему указан созданный на шаге 2 элемент
    4. Действие отрабатывает успешно, в результате - Файл
    5. Поле Definition в элементе не поменялось
    5

    Нет элемента, подходящего под заданный порядковый номер с заданными свойствами

    1. В поле "Заменить" действия "Заменить совпадения" указать строковую переменную, в которой записано "2"
      В поле "На" указать строковый результат какого-то действия "11"
    2. Запустить робота
    3. Открыть win-элемент
  • Параметры действия "Заменить совпадения" заполнены
  • Робот падает с ошибкой: win-элемент не найден
  • Поле Definition в элементе не поменялось

    ...

    1. In the "Get element text" action, the element created in step 2 is still specified

    2. Launch the robot

    3. Open win-element

    1. Action is added

    2. Parameters are filled

    3. The "Get element text" action still contains the element created in step 2

    4. The action works successfully, and the result is File.

    5. The Definition field in the element has not changed

    5

    There is no item matching the given sequence number with the given properties

    1. In the "Replace" field of the "Replace matches" action, specify a string variable in which "2" is written

    2. In the "To" field, specify the string result of some action "11"

    3. Launch the robot

    4. Open win-element

    1. Parameters of the "Replace matches" action are full

    2. The robot crashes with the error: win-element not found

    3. Definition field in the element has not changed


    Screenshot and display of the captured item

    In order to view the screenshot of a win / web / sap element on the screen, you need to:

    1 way.

    1. Click on edit web element, the options window will appear;

      Image Added

    2. Click on the " Screenshot of the element" button, a window with the image will appear.

      Image Added

    Positions for the button in the parameters:

    • The "Screenshot of item" button is always displayed, if there is a screenshot saved by the spy, it will open on click, if not, the button will be inactive.

    • The dialog window where the screenshot will appear displays a picture and a cross to close the window.

    • The saved screenshot is stored in the project folder. 

    • If the resource (web/win element) has been deleted from the studio, the screenshot will also be deleted.

    • If when editing a resource (web/win element) a new element is written there via Spy, the old screenshot will be replaced or deleted. 

    • The window is not displayed on the full screen when opening a screenshot (in the size of the standard toolkit).

    2 way. 

    1. While in action on the flow associated with the screenshot, hover over the camera icon; a thumbnail of the captured element with a precise location marker will be displayed.

      Image Added

    2. If you move the cursor away from the camera icon, the screenshot will close.

    Positions for the button on the action:

    • The screenshot icon is displayed on those actions that use win/web elements (i.e. browser actions and windows)

    • If the screenshot is NOT attached to win/web/sap actions, there is no screenshot icon on them.

    • If the element is recorded via Spy, a screenshot is taken there and will be visible when hovering over the icon. If the user created the web-element himself and filled in the fields, there will be no screenshot there.

    • If you change the link to the resource in the action, the screenshot will change immediately, no need to perform additional actions (save, reopen the project, restart the studio).