Pros • Separates where tests run from where the browser is • Allows tests to use browsers not available on the current OS Cons • Requires an external server • Introduces extra latency to tests
server • Used to start the right driver • Drivers have special capabilities • Server sends capabilities back (informing what has been given) http://code.google.com/p/selenium/wiki/DesiredCapabilities
base64 encodes and sends it transparently!! File file = new File("firebug-1.8.1.xpi"); FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.addExtension(file); firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1"); DesiredCapabilities capabilities = new DesiredCapabilities.Firefox(); capabilities.setFirefoxProfile(firefoxProfile); WebDriver driver = new RemoteWebDriver(capabilities);
1. WebDriver detects a path and finds the file 2. Sends it base64 encoded and gets the remote path 3. Uses sendKeys with the new (remote) path https://gist.github.com/1508946