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

Ключ

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

...

This action is intended to open the selected browser. A context is created when the browser is opened.

Action icon

Image Modified

Action parameters

...

URL                                             The The URL that should be navigated to when the browser is opened

Save in                                         The path to the folder where files should be saved when downloaded

...

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Browser

Browser selection

Default is Chrome


Dropdown list:

  • Chrome
  • Yandex
  • Firefox
  • Internet Explorer
  • Edge (chromium)
Robin.StringChromeNo
PropertiesList of browser properties and their values ​​that will be set when the browser starts

In JSON format, describing a list of browser properties and their values to be set at launch

If the parameter is populated, its values take precedence over the values of the other fields

You can connect extensions and set the profile through this parameter

Robin.StringJSON по шаблонуNo
Explicitly waitTime to wait for changes in the properties of individual elements

Specifies a waiting time limit value to be used by default in group actions, determining the time to access items

Measured in milliseconds

Robin.Numeric10000No
Background modeBackground mode
Internet Explorer does not support this setting (вопрос)
Robin.BooleantrueNo
URLURL to be navigated after opening the browserRobin.Stringhttps://google.com/No
Save inPath to folder to save filesRobin.FolderPathC:\doc\imgNo
Results
ContextThe browser instance that Selenium will work withBrowser instance with which Selenium will workRobin.SeleniumBrowser context

Special conditions of use 

Пример1Example 1. Example of filling in the "Properties" field (filled in automatically by recording actions in Recorder). 

...

Alternatively, you can specify "none" instead of "eager", but then there is a risk that the page will not load. The "eager" value only waits for the page DOM to load, without waiting for scripts, images and other resources to load, the "none" value does not wait at all.

...

Example 2.

...

Driver absence message

When performing the “Open Browser” action, if you use an encoding other than UTF-8 in the env.cfg file - for example, with Cyrillic characters - you may get a situation where if the driver is present, a message about its absence appears:Image Added

Result

The actionfailsbecause the driver is notfound.

The reason is a problem in the encoding of the env.cfg file. In our example, on a virtual host, the file was encoded in

...

При выполнении действия "Открыть браузер" при использовании в файле env.cfg кодировки, отличной от UTF-8, например, с кириллицей - может возникнуть ситуация, когда при наличии драйвера, появляется сообщение об его отсутствии:
Image Removed

Результат: действие завершается с ошибкой, потому что драйвер не найден.

Причиной является проблема в кодировке файла env.cfg. В нашем примере на виртуальной машине файл был в кодировке Windows-1251:

Для того, чтобы отработало действие "Открыть браузер", нужно сконвертировать и пересохранить файл в кодировке UTF-8:
Image Removed

Действие будет запущено, робот завершится без ошибки. Браузер откроется.

In order for the "Open Browser"actiontowork, you need to convertandresave the fileinUTF-8 encoding:Image Added

The actionwill be started, and the robot will completewithout an error. The browser will open.

Информация
Информация
Эту ситуацию можно воспроизвести с любой папкой, у которой есть кириллица в пути. При этом не обязательно, чтобы сам пользователь был записан кириллицей

Thissituationcan be replicatedwithanyfolderthathasCyrillic letters in the path.At the same time, it is notnecessarythattheuser himself bewritten in Cyrillic

.


Example of use

Task

Open the selected browser on the given page, get the action context for working with actions of the "Browsers" group.

...

  1. Open the "Browsers" action group
  2. Open the "Windows, tabs, frames" subgroup 
  3. Add the "Open Browser" action to the workspace.
  4. Set the action parameters:
    1. "Browser" field. Select a browser from the drop-down list that you want to open. 
    2. "Properties" field. Specify a JSON-formatted file using a template that will set the prioritized properties to launch the browser. 
    3. "Explicitly wait" field. Set the timeout time to 1000ms.
    4. "Background mode" field. The value is "True" or "False". Leave "False" to open the browser in visible mode.  
    5. "URL" field. Specify the URL that will be used to open the browser - https://ya.ru
    6. The "Save in" field. Specify the address on the PC where the downloaded files will be saved if the download link is specified in the "Address" parameter.
  5. Add the "Close browser" action to the workspace. Fill in the "Context" parameter.
  6. Launch the robot using the "Start" button in the top panel.

Result

The Edge browser was opened in visible mode, and the page was navigated to https://ya.ru