1. Refactor java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java and add the following method:
void registerCommand(String commandName, String endpointPath, String httpMethod) { if (this.customizedNameToUrl.containsKey(commandName)) return; if ("get".equalsIgnoreCase(httpMethod)) { this.customizedNameToUrl.put(commandName, get(endpoitPath)); } else if ("post".equalsIgnoreCase(httpMethod)) { this.customizedNameToUrl.put(commandName, post(endpoitPath)); } else if ("delete".equalsIgnoreCase(httpMethod)) { this.customizedNameToUrl.put(commandName, delete(endpoitPath)); } else { throw new RuntimeException("Unsupported http method:" + httpMethod); } }
2. As a browser vendor, we could add a BROWSERUtil.java (eg., java/client/src/org/openqa/selenium/chrome/ChromeUtil.java)
boolean LaunchApp(RemoteWebDriver driver, String appId) {
HttpCommandExecutor executor = driver.getCommandExecutor();
executor.registerCommand("chromium-launch-app", "/session/:sessionId/chromium/launch_app", "post");
Map<String, String> params = new HashMap<String, String>();
param.put(“id”, appId);
Command cmd = new Command(driver.getSessionId(), “chromium-launch-app”, params);
Response response = executor.execute(cmd);
// Parse response and return the result...
return true;
}
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAL_dnaVADk17A4KYF1-%2BejC%3DQTA5W1pTKm95%2ByQN7bGjrE%2BcBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAHADtUMU%2BQw1C8rqfvh325wfP62HVGkg-DugyHnMEZ1n8dG%3D6Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAL_dnaVADk17A4KYF1-%2BejC%3DQTA5W1pTKm95%2ByQN7bGjrE%2BcBg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAChzDznYga4sQ%3DKAzENjFA%3DdK82eypefyN%2BoeE%2BucQgt%2BSCY4A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAPmg_csC8UsiZS8i7nujr2tniNb9m9pCA8-Eg%2BVtq4ufrC5T3g%40mail.gmail.com.
It seems not that nice to ask ends users to download additional packages/libraries besides the selenium ones.What's the main reason that we wanted to leave vendor code hosted by vendors themselves?As java/client/src/org/openqa/selenium/[chrome|firefox|ie|safari|android|etc]/ are more browser-specific, could we just add stuff related to vendor-specific commands to those directories?It seems better to maintain both parts together:- No additional download step for end users.- If change on selenium side breaks vendor-specific codes, we could discover it right away by running all tests together in selenium.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAHADtUPT3D3CJuwxc6VPpK7zoOsY1x09gFMUO432SGUOtey1ww%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/CAOrAhYFhd8u8Z0%2B6J7%3D%2BrV4h%2BPPDnLvAsK-A6g%2B59Jqkf1PY7g%40mail.gmail.com.