的Firefox版本:52.0.2(32位)
平台:Windows 7的
硒webdriver的版本:3.4.0(Java绑定)
问题陈述: 虽然试图在Firefox浏览器进行全屏幕操作,它抛出UnsupportedCommandException
全屏操作没有硒的webdriver 3.x的工作
测试代码:
public class GeckoTest {
public static void main(String[] args) throws IOException {
System.setProperty("webdriver.gecko.driver","<geckodriver executable>");
FirefoxBinary binary = new FirefoxBinary(new File("firefox binary"));
FirefoxOptions options = new FirefoxOptions();
options.setBinary(binary);
options.setLogLevel(Level.ALL);
WebDriver browser = new FirefoxDriver(options);
browser.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
browser.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
browser.get("http://examples.sencha.com/extjs/6.5.0/examples/kitchensink/?classic#form-fieldtypes");
browser.manage().window().fullscreen();
WebDriverWait wait = new WebDriverWait(browser,20,3000);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//div[contains(@class,'x-form-spinner x-form-spinner-default x-form-spinner-down x-form-spinner-down-default')]")));
Actions builder = new Actions(browser);
builder.doubleClick(browser.findElement(By.xpath(".//div[contains(@class,'x-form-spinner x-form-spinner-default x-form-spinner-down x-form-spinner-down-default')]"))).perform();
browser.close();
}
}
编辑:看来,这是一个已知的ISSU e和将被固定在FF55按本enter link description here
从Gecko驱动程序默认情况下,如果以全屏启动FireFox ...我认为gecko没有实现任何全屏方法 –
这似乎是一个问题,将按照这个:FF:http:// bugzilla实现。 mozilla.org/show_bug.cgi?id=1189749 –