Testing browser extension with selenium C # in Saucelabs

Is it possible to test browser extensions with C # selenium in Saucelab . If so, how and where to place the latest extension pack in the saucelab VM so that selenium will launch the browser with the extension.

+3


source to share


1 answer


For Firefox and chrome, this is possible by providing a feature or profile. For example, in the case of firefox:

File file = new file ("firebug-1.8.1.xpi"); FirefoxProfile firefoxProfile = new FirefoxProfile (); firefoxProfile.addExtension (file); firefoxProfile.setPreference ("extensions.firebug.currentVersion", "1.8.1"); // Avoid launching the screen



WebDriver driver = new FirefoxDriver (firefoxProfile);

0


source







All Articles