在 Saucelabs 中使用 selenium c# 进行浏览器扩展测试

本文关键字:浏览器 扩展 测试 selenium Saucelabs | 更新日期: 2023-09-27 18:35:02

是否可以在Saucelab中使用Selenium c#测试浏览器扩展。如果是这样,如何在saucelab VM中放置最新的扩展包以及在哪里放置,以便Selenium启动带有扩展的浏览器。

在 Saucelabs 中使用 selenium c# 进行浏览器扩展测试

对于Firefox和chrome,可以通过提供功能或配置文件来实现。例如,在火狐的情况下:

文件文件 = 新文件("firebug-1.8.1.xpi"(; FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.addExtension(file(; firefoxProfile.setPreference("extensions.firebug.currentVersion", "1.8.1"(;避免启动屏幕

WebDriver driver = new FirefoxDriver(firefoxProfile(;