如何获取 Firefox 构建 ID?
how to get Firefox build id?
有谁知道如何在 java/selenium 测试中获取 Firefox 构建 ID(该字符串由 14 位数字组成)?
你可以在浏览器中访问查看,about:config然后通过buildID搜索你会看到那里的字符串,但是如何通过java测试访问才能显示?
亲切的问候
使用这个
Capabilities cap = ((RemoteWebDriver) driver).getCapabilities();
String browserVersion = (String)cap.getCapability("browserVersion");
有谁知道如何在 java/selenium 测试中获取 Firefox 构建 ID(该字符串由 14 位数字组成)?
你可以在浏览器中访问查看,about:config然后通过buildID搜索你会看到那里的字符串,但是如何通过java测试访问才能显示?
亲切的问候
使用这个
Capabilities cap = ((RemoteWebDriver) driver).getCapabilities();
String browserVersion = (String)cap.getCapability("browserVersion");