我无法在Selenium 3.8.1中使用geckodriver启动 Firefox 浏览器
这是我的代码
public class LoginTest {
@SuppressWarnings("deprecation")
@Test
public static void logintest() {
System.setProperty("webdriver.gecko.driver",
"C:\\Users\\abc\\Downloads\\geckodriver.exe");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability("marionnete", true);
constants.driver = new FirefoxDriver(dc);
constants.driver.get("https://www.amazon.in");
constants.driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
constants.driver.manage().window().maximize();
}
我无法理解为什么它不起作用并且总是给出异常
org.openqa.selenium.SessionNotCreatedException`: Unable to find a matching set of capabilities
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12- 01T18:33:54.468Z'<br>
System info: host: 'ABC-VAIO', ip: '192.168.1.209', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_161'<br>
Driver info: driver.version: FirefoxDriver