Как я тестирую модальные диалоговые окна с Селеном?

Лучший способ - отобразить вывод в ALV, используя CL_GUI_ALV_GRID .

Для изменения сетки ALV,

Вы должны зарегистрировать событие DATA_CHANGED и помочь вам написать свой код в случае изменения данных.

Для выбранных строк, вы должны создать поле флажка в itab, которое поможет вам управлять выбранными строками.

Если вы хотите перенести изменения экрана в itab, вам нужно вызвать метод check_changed_data для передачи изменений из экрана в itab при событии PAI .

Для некоторых сценариев, если вы хотите узнать какие-либо изменения в содержимом строки, вам нужно создать еще одно поле data_change символьного типа длиной 1. Вы можете пометить это поле в соответствующем событии, если есть изменение в содержании итаб.

С уважением,

Умар Абдулла

8
задан Dafydd Rees 6 December 2012 в 15:08
поделиться

2 ответа

From the Selenium FAQ, Selenium apparently works with some types of dialogs but not others:

I can't interact with a popup dialog. My test stops in its tracks!

You can, but only if the dialog is an alert or confirmation dialog. Other special dialogs can't be dismissed by javascript, and thus currently cannot be interacted with. These include the "Save File", "Remember this Password" (Firefox), and modal (IE) dialogs. When they appear, Selenium can only wring its hands in despair.

To solve this issue, you may use a workaround (if one exists); otherwise you may have to exclude the test from your automated corpus. For the "Save File" dialog in Firefox, a custom template may be specified when running via the RC that will always cause the file to be downloaded to a specified location, without querying the user (see http://forums.openqa.org/thread.jspa?messageID=31350). The "Remember this Password" dialog should not appear again after you've chosen to remember it. Currently there is not much that can be done about IE modal dialogs.

I seem to remember someone working around this with an AutoHotKey script that dismissed the dialog.

3
ответ дан 5 December 2019 в 20:18
поделиться
2
ответ дан 5 December 2019 в 20:18
поделиться
Другие вопросы по тегам:

Похожие вопросы: