是否可以在 Saucelab 中使用 selenium c# 测试浏览器扩展。如果是这样,如何以及在何处将最新的扩展包放置在 saucelab VM 中,以便 selenium 启动带有扩展的浏览器。
最佳答案
对于 Firefox 和 chrome,可以通过提供功能或配置文件来实现。例如在 firefox 的情况下:
File file = new File("firebug-1.8.1.xpi"); FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.addExtension(文件); firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1");//避免启动屏幕
WebDriver 驱动程序 = new FirefoxDriver(firefoxProfile);
关于c# - 在 Saucelabs 中使用 selenium c# 进行浏览器扩展测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27619760/