Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit fe5b8bb

Browse files
committed
Corrected by review comments
1 parent 36eb5d8 commit fe5b8bb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/main/java/com/github/markusbernhardt/seleniumlibrary/keywords/BrowserManagement.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class BrowserManagement extends RunOnFailureKeywordsAdapter {
103103
protected Element element;
104104

105105
@Autowired
106-
private Robot robot = new Robot();
106+
private Robot robot;
107107

108108
// ##############################
109109
// Getter / Setter
@@ -171,30 +171,30 @@ public void closeBrowser() {
171171
"| JBrowser | jbrowser |\r\n" +
172172
"\r\n" +
173173
"To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the [https://github.com/Hi-Fi/robotframework-seleniumlibrary-java#browser-drivers|project documentation] for more details.\r\n" +
174-
"\r\n" +
175-
"Optional ``isWebDriverManager`` is a flag of using automation download driver of browser and setting system variable for driver path.\r\n" +
176174
"\r\n" +
177175
"Optional ``alias`` is an alias given for this browser instance and it can be used for switching between browsers. An alternative approach for switching is using an index returned by this keyword. These indices start from 1, are incremented when new browsers are opened, and reset back to 1 when `Close All Browsers` is called. See `Switch Browser` for more information and examples.\r\n" +
178176
"\r\n" +
179-
"Optional ``remote_url`` is the URL for a remote Selenium server. If you specify a value for a remote, you can also specify ``desired_capabilities`` to configure, for example, a proxy server for Internet Explorer or a browser and operating system when using [http://saucelabs.com|Sauce Labs]. Desired capabilities can be given as a dictionary. [https://github.com/SeleniumHQ/selenium/wiki/Capabilities| Selenium documentation] lists possible capabilities that can be enabled.\r\n" +
177+
"Optional ``remote_url`` is the URL for a remote Selenium server. If you specify a value for a remote, you can also specify ``desired_capabilities`` to configure, for example, a proxy server for Internet Explorer or a browser and operating system when using [http://saucelabs.com|Sauce Labs]. Desired capabilities can be given as a dictionary. [https://github.com/SeleniumHQ/selenium/wiki/Capabilities| Selenium documentation] lists possible capabilities that can be enabled.\r\n" +
180178
"\r\n" +
181-
"Optional ``ff_profile_dir`` is the path to the Firefox profile directory if you wish to overwrite the default profile Selenium uses. Notice that prior to SeleniumLibrary 3.0, the library contained its own profile that was used by default.\r\n" +
179+
"Optional ``ff_profile_dir`` is the path to the Firefox profile directory if you wish to overwrite the default profile Selenium uses. Notice that prior to SeleniumLibrary 3.0, the library contained its own profile that was used by default.\r\n" +
180+
"\r\n" +
181+
"Optional ``isWebDriverManager`` is a flag of using automation download driver of browser and setting system variable for driver path.\r\n" +
182182
"\r\n" +
183183
"Examples:\r\n" +
184184
"| `Open Browser` | http://example.com | Chrome |\r\n" +
185185
"| `Open Browser` | http://example.com | Firefox | alias=Firefox |\r\n" +
186186
"| `Open Browser` | http://example.com | Edge | remote_url=http://127.0.0.1:4444/wd/hub |\r\n" +
187187
"\r\n" +
188188
"If the provided configuration options are not enough, it is possible to use `Create Webdriver` to customize browser initialization even more.")
189-
@ArgumentNames({ "url", "browserName=firefox", "isWebDriverManager=false", "alias=None", "remoteUrl=None",
190-
"desiredCapabilities=None", "browserOptions=None" })
189+
@ArgumentNames({ "url", "browserName=firefox", "alias=None", "remoteUrl=None", "desiredCapabilities=None",
190+
"browserOptions=None", "isWebDriverManager=false" })
191191
public String openBrowser(String url, String... args) {
192192
String browserName = robot.getParamsValue(args, 0, "firefox");
193-
boolean isWebDriverManager = robot.getParamsValue(args, 1, false);
194-
String alias = robot.getParamsValue(args, 2, "None");
195-
String remoteUrl = robot.getParamsValue(args, 3, "None");
196-
String desiredCapabilities = robot.getParamsValue(args, 4, "None");
197-
String browserOptions = robot.getParamsValue(args, 5, "None");
193+
String alias = robot.getParamsValue(args, 1, "None");
194+
String remoteUrl = robot.getParamsValue(args, 2, "None");
195+
String desiredCapabilities = robot.getParamsValue(args, 3, "None");
196+
String browserOptions = robot.getParamsValue(args, 4, "None");
197+
boolean isWebDriverManager = robot.getParamsValue(args, 5, false);
198198

199199
if (isWebDriverManager) {
200200
webDriverManagerSetup(browserName);

0 commit comments

Comments
 (0)