Connect to an open browser Version 7 (Java)
Action group: Browsers
Description
The action connects to a pre-opened browser window. It does not connect to windows that other robots have opened or connected to.
Action icon
Parameters
Input parameters
- Browser - The name of the browser to connect to. For example: Chrome.
- Address - The default IP to connect to. The default value is localhost.
- Port - The port where the connection is coming from. The default value is 9222/.
Output parameters
The output is the browser instance that the actions will work with.
Settings
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Browser | The name of the browser to connect to. | Robin.String | Yes | |
Address | IP address for connection. Default is localhost. | Robin.String | No | |
Port | IP address for connection. Default is 9222. | Robin.Numeric | No | |
Results | ||||
Context | The browser instance that actions will work with. | Robin.Selenium | Browser context |
Special conditions of use
Parameters may vary depending on the version.
The RobinRecorder 0.2 browser extension must be installed beforehand.
The following steps must be performed for the action to work correctly:
- Right-click on the browser shortcut and add --remote-debugging-port=9222 to the Object field
Click on the "OK" button. - Go to Task manager and check that no Chromium-based browsers are running (except the required one).
If they are running, close them.
List of these browsers: https://ru.wikipedia.org/wiki/%D0%91%D1%80%D0%B0%D1%83%D0%B7%D0%B5%D1%80%D1%8B_%D0%BD%D0%B0_%D0%B1%D0%B0%D0%B7%D0%B5_Chromium - Install web drivers for Chrome and Yandex browsers. Place them, for example, in the root of the C drive.
You can download them by following the links: https://github.com/yandex/YandexDriver/releases и https://chromedriver.chromium.org/ - Verify that there is an env.cfg file in the .robin folder with the specified drivers and their versions.
- The browser must be minimized before running the action.
- If there are multiple tabs open in a browser, the action can connect to any of them. If multiple browsers are open, the action connects to the instance that is launched first.
Additionally:
- If multiple tabs are open, the robot can connect to any tab.
- There will be no robot-controlled notification in the browser window.
- After the robot finishes, the browser page will remain open unless some other action is taken.
Example of use
Task
Connect to your Chrome browser and follow the link.
Solution
Use the "Connect to an open browser", "Navigate" actions.
Implementation
- Assemble a robot scheme consisting of the actions: "Connect to an open browser", "Navigate".
- Set a parameters for the "Connect to open browser" action
Customize the parameters of the "Navigate" action. In the "Context" field, select the context of the "Connect to an open browser" action. In the "Address" field, specify the address you want to go to. Make the "In a new tab?" field active.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully. Connection to an open browser and clicking on the link was performed.
Browser view after clicking on the link.