导入org.openqa.selenium.remote.CapabilityType无法解析 [英] The import org.openqa.selenium.remote.CapabilityType cannot be resolved

查看:666
本文介绍了导入org.openqa.selenium.remote.CapabilityType无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Selenium 3.4.0中进行以下两次导入

I can't do the following two imports in Selenium 3.4.0

import org.openqa.selenium.remote.CapabilityType;  
import org.openqa.selenium.remote.DesiredCapabilities;

我对硒的Maven依赖性如下:

My maven dependencies for selenium is as below:

<dependency>  
    <groupId>org.seleniumhq.selenium</groupId>  
    <artifactId>selenium-java</artifactId>  
    <version>3.4.0</version>  
</dependency>  
<dependency>  
    <groupId>org.seleniumhq.selenium</groupId>  
    <artifactId>selenium-server</artifactId>  
    <version>3.4.0</version>  
</dependency> 

我在Eclipse中收到类似The import org.openqa.selenium.remote.CapabilityType cannot be resolved的错误消息

I'm getting error messageslike The import org.openqa.selenium.remote.CapabilityType cannot be resolved in Eclipse

可能是什么问题?

推荐答案

在pom.xml中添加此附加依赖项

Add this additional dependency in your pom.xml

<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-remote-driver -->
<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-remote-driver</artifactId>
    <version>2.44.0</version>
</dependency>

这篇关于导入org.openqa.selenium.remote.CapabilityType无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆