Open Megha06S opened 4 years ago
In eclipse its not able to recognize desiredcapabilities.
Below is my pom.xml content <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>MobAuto</groupId>
<artifactId>AppiumProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.3.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ AppiumProject --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ AppiumProject --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 1 source file to C:\Users\Acer\eclipse-workspace\AppiumProject\target\test-classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /C:/Users/Acer/eclipse-workspace/AppiumProject/src/test/java/AppiumTest.java:[11,17] cannot find symbol symbol: class DesiredCapabilities location: class AppiumTest [ERROR] /C:/Users/Acer/eclipse-workspace/AppiumProject/src/test/java/AppiumTest.java:[11,45] cannot find symbol symbol: class DesiredCapabilities location: class AppiumTest [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:11 min [INFO] Finished at: 2020-07-06T11:58:31+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile (default-testCompile) on project AppiumProject: Compilation failure: Compilation failure: [ERROR] /C:/Users/Acer/eclipse-workspace/AppiumProject/src/test/java/AppiumTest.java:[11,17] cannot find symbol [ERROR] symbol: class DesiredCapabilities [ERROR] location: class AppiumTest [ERROR] /C:/Users/Acer/eclipse-workspace/AppiumProject/src/test/java/AppiumTest.java:[11,45] cannot find symbol [ERROR] symbol: class DesiredCapabilities [ERROR] location: class AppiumTest [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException