Вы просматриваете старую версию данной страницы. Смотрите текущую версию.

Сравнить с текущим просмотр истории страницы

« Предыдущий Версия 3 Следующий »

Order is the ordinal number of an element. It works considering the selected properties. If multiple elements are found based on the selected properties, „order“ allows specifying which of these found elements is needed.

Order - a string value. The «Order» property is located in Definition.

To change the order value with another action, you need to refer to it as Element.Definition.

Successful execution.

Precondition: a win-element is created.

  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).

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

Let’s consider other examples described in the table below:

Prerequisite:

  1. A new robot is opened or created

  2. Notepad application is opened

Action

Expected result

1

  1. Start Win-Spy


  2. Capture Win-element


  3. 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:


  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


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


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


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

    {
    "30004": "menu item",
    "order": "6"
    }

  5. Win-element is saved (with the name "menu item")

3

Launch action

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


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


  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)


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

  3. In the "Replace" field, specify "order": "6"

  4. In the "To" field, specify "order": "2"

  5. Save the result in "menu item.Definition"

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

  7. Launch the robot

  8. 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;


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


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.


  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).

  • Нет меток