История страницы
...
Wait for file to download Version 1 (Java)
Группа действийAction group: Браузеры Browsers
Описание
Действие скачивает файл со страницы браузера и ожидает окончания его полной загрузки.
Иконка действия
Параметры действия
Входные параметры
Поле "Контекст" - Контекст действия для работы с браузером.
Поле "Элемент" - Элемент, с которым работает действие. На странице в браузере этот элемент должен содержать URL, по которому можно скачать файл.
- Поле "Имя файла" - Наименование, которое будет иметь скачанный файл. Указанное наименование может не совпадать с исходным наименованием файла на сайте.
- Поле "Формат" - Формат, с которым будет скачан файл. Если указанное значение не совпадает с исходным форматом файла на сайте, открытие файла может сопровождаться ошибкой.
- Поле "Путь к папке" - Путь к папке, в которой будет сохранен файл.
- Поле "Тайм-аут, мс" - Время ожидания ответа от ресурса, с которого будет скачан файл. Если время ожидания ответа превысит указанное значение, действие вернет ошибку. Задается в миллисекундах. Значение по умолчанию: 10000 мс.
Настройки
...
Контекст действия для работы с браузером
...
Идентификатор сеанса браузера
ACTION_CONTEXT
...
Да
...
Description
The action downloads the file from the browser page and waits for it to finish downloading completely.
Action icon
Settings and their parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | Action context for working with the browser. | Robin.Selenium | Browser context | Yes |
Element | The element on which the action works. On a page in a browser, this element should contain a URL where the file can be downloaded. | Robin.WebElement | Yes | |
File name | The name of the downloaded file. The specified name may not match the original file name on the site. | Robin.String | Yes | |
Extension | The format in which the file will be downloaded. If the specified value does not match the original file format on the site, opening the file may be accompanied by an error. | Robin.String | Yes | |
Folder path | The path to the folder where the file will be saved. | Robin.FolderPath | C:\doc\img | Yes |
Timeout, ms | Time to wait for a response from the resource from which the file will be downloaded. If the response timeout exceeds the specified value, the action will return an error. Specified in milliseconds. Default value: 10000 ms. | Robin.Numeric | No | |
Results | ||||
Result | The path to the downloaded file. | Robin.FilePath |
Special conditions of use
None.
Example of use
Task
Open the page in the browser
...
File name
...
Folder path
...
Особые условия использования
Отсутствуют.
Пример использования
Задача
открыть страницу в браузере https://fastest.fish/test-files и дождаться скачивания файла на рабочий стол, далее закрыть страницу браузера.
Решение
воспользоваться действиями "Открыть браузер", "Ждать окончания загрузки файла", "Закрыть браузер".
Реализация
- Собрать схему робота, состоящую из действий:
2. Настроить параметры для действия "Открыть браузер".
3. Настроить параметры для действия "Ждать окончания загрузки файла".
4. Настроить параметры для действия "Закрыть браузер".
5. Нажать на кнопку "Старт" в верхней панели.
Результат
Программный робот отработал успешно. Требуемый файл скачан на рабочий стол.
and wait for the file to download to the desktop, then close the browser page.
Solution
Use the actions "Open Browser", "Wait for file to download", "Close Browser".
Implementation
- Assemble a robot scheme consisting of actions:
2. Set the parameters for the "Open Browser" action.
3. Set the parameters for the "Wait for file to download" action.
4. Set the parameters for the "Close Browser" action.
5. Click on the "Start" button in the top panel.
Result
The program robot completed successfully. The required file has been downloaded to the desktop.