title: Getting error: cannot access org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator
body: <p>I am trying to run appium code via maven command, but not able to do so. I have searched a lot but did not find any answer for the issue.</p>
  
  <p>While running the code as TestNG it works fine. But, when I try to run using mvn test I am getting the error.</p>
  
  <p><a href="https://i.stack.imgur.com/X1R2N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X1R2N.png" alt="Error_Photo"></a></p>
  
  <p>Utilities.java ( where the mvn is throwing the error )</p>
  
  <pre><code>package practise.AppiumFramework;
  
  import io.appium.java_client.android.AndroidDriver;
  import io.appium.java_client.android.AndroidElement;
  
  public class Utilities {
      AndroidDriver&lt;AndroidElement&gt; driver;
  
      public Utilities(AndroidDriver&lt;AndroidElement&gt; driver) {
              this.driver = driver;
      }
  
      public void scrollToText(String text) {
          driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView(text(\""+text+"\"));");
      }
  }
  </code></pre>
  
  <p>POM.xml</p>
  
  <pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;practise&lt;/groupId&gt;
    &lt;artifactId&gt;AppiumFramework&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;AppiumFramework&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
    &lt;/properties&gt;
  
    &lt;build&gt;
    &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/java/resources&lt;/directory&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
          &lt;/resource&gt;
    &lt;/resources&gt;
  
    &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.0.0-M4&lt;/version&gt;
          &lt;configuration&gt;
            &lt;suiteXmlFiles&gt;
              &lt;suiteXmlFile&gt;testng.xml&lt;/suiteXmlFile&gt;
            &lt;/suiteXmlFiles&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
    &lt;/build&gt;
  
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.testng&lt;/groupId&gt;
          &lt;artifactId&gt;testng&lt;/artifactId&gt;
          &lt;version&gt;7.1.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;io.appium&lt;/groupId&gt;
          &lt;artifactId&gt;java-client&lt;/artifactId&gt;
          &lt;version&gt;7.3.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
          &lt;version&gt;4.0.0-alpha-6&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-api&lt;/artifactId&gt;
          &lt;version&gt;3.14.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;2.0.0-alpha1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;version&gt;3.10&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/commons-io/commons-io --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.7&lt;/version&gt;
      &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/commons-validator/commons-validator --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-validator&lt;/groupId&gt;
          &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
          &lt;version&gt;1.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/com.aventstack/extentreports --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
          &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
          &lt;version&gt;4.1.6&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  
  
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Kindly let me know if you guys need any more information?</p>