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

Ключ

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

Оглавление

...

Retrieving an XPath

...

element  

To complete actions with the element parameter, you must create a SAP element. To do this, you need to open SapSpy.

Click on the triplet near the "Element" field

Для заполнения действий с параметром элемент необходимо создать элемент SAP. Для этого необходимо открыть SapSpy.

Нажать на троеточие около поля "Элемент"

ДалееNext, на кнопку Image Removed

В появившемся окне нажать на кнопку SapSpy

Image Removed

the button Image Added

In the window that appears, click the SapSpy button

Image Added

A window will be openedБудет открыто окно:

  • Создать новое подключение (ввести данные учетной записи, далее нажать «Подключиться»Create a new connection (enter account details, then click "Connect")
    Либо подключиться к
  • открытой учетной записи SAP (выбрать учетную запись, нажать «Подключиться»Or connect to an open SAP account (select the account, click "Connect").


Для получения id элемента применяется кнопка «Захватить», затем CTRL+ левый клик мышью.Image Removed

После получения элемента нажимаем кнопку «Остановить».

Для проверки правильности захвата нажимаем кнопку «Найти» – SPY обводит найденный элемент красной рамочкой.

To get the item id, the "Capture" button is applied, then CTRL+left mouse click.


Image Added

After the item is captured, click the "Stop" button.

To check if the capture is correct, click the "Find" button - SPY circles the found element with a red frame.

As xpath you need to get В качестве xpath необходимо получить session+id – /app/con[0]/ses[0]/wnd[0]/usr/tblSAPMP50ATC_MENU_EVENT

Если в работе используется несколько окон SAP, xpath элемента изменяется соответственно:

If more than one SAP window is used in a work, the xpath of the element is changed accordingly:

  • first open window первое открытое окно - /app/con[0]/ses[0]/wnd[0]/usr/tblSAPMP50ATC_MENU_EVENT
  • второе открытое окно second open window - /app/con[0]/ses[1]/wnd[0]/usr/tblSAPMP50ATC_MENU_EVENT
  • и т.дetc.


...




...

Getting table Xpath

...

Для работы с действиями «Клик по ячейке таблицы», «Получить таблицу», «Ввести текст в ячейку таблицы» и «Получить ячейку таблицы» используется один и тот же xpath таблицы.

The same table xpath is used to handle the "Click table cell", "Get table", "Enter text in table cell" and "Get table cell" actions.

  • In case the table has the form tbl:

To do this, select the desired cell in the table, or the table itself, then the resulting

  • В случае, если таблица имеет вид tbl:

Для этого выбирается необходимая ячейка в таблице, либо сама таблица, далее полученный xpath

 /app/con[0]/ses[0]/wnd[0]/usr/tblSAPMP50ATC_MENU_EVENT/txtT529T-MNTXT[0,12]

сокращается до xpath таблицыis reduced to the xpath of the table:

/app/con[0]/ses[0]/wnd[0]/usr/tblSAPMP50ATC_MENU_EVENT

Далее полученный xpath используется для создания элемента, применяемого и для таблиц, и для ячеек таблиц:

Image Removed


The resulting xpath is then used to create an element that applies to both tables and table cells:

Image Added

And the address of the cell in the table А в адрес ячейки в таблице ([0,12]) вносятся в сами параметры действияis entered into the action parameters themselves:

Image Modified

  • В случае, если таблица имеет вид shell:
  • In case the table has the shell form:

The resulting xpath is not abbreviated, and the address of the cell in the table Полученный xpath не сокращается, а адрес ячейки в таблице ([0,12]) также вносятся в сами параметры действия. is also entered into the action parameters themselves.