java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;) with Selenium, gradle and ChromeDriver

前端 未结 7 1750
别跟我提以往
别跟我提以往 2020-11-27 08:28

I am trying to use Selenium api with Gradle. This is my build.gradle dependency section:

dependencies {
    compile \'com.google.api-client:google-api-clien         


        
7条回答
  •  星月不相逢
    2020-11-27 09:20

    copy and paste the following dependencies in the pom.xml and then do a maven build:

     
        
          junit
          junit
          4.12
          test
        
    
          
    
        org.testng
        testng
        7.1.0
        test
    
    
        
    
        io.rest-assured
        rest-assured
        3.0.0
        test
    
    
        
    
        io.rest-assured
        json-path
        3.0.0
    
    
        
    
        io.rest-assured
        json-schema-validator
        3.0.0
    
    
    
    
        io.rest-assured
        xml-path
        3.0.0
    
    
        
    
        org.hamcrest
        java-hamcrest
        2.0.0.0
        test
    
    
    
        
    
    
        
        
        net.masterthought
        cucumber-reporting
        4.7.0
        
    
        
        
            info.cukes
            cucumber-core
            1.2.5
        
    
        
            info.cukes
            cucumber-java
            1.2.5
            test
        
    
        
            info.cukes
            cucumber-jvm
            1.2.5
            pom
        
    
        
            info.cukes
            cucumber-junit
            1.2.5
            test
        
    
        
            info.cukes
            cucumber-jvm-deps
            1.0.5
        
    
        
    
        info.cukes
        cucumber-html
        0.2.3
    
    
    
    
        info.cukes
        gherkin
        2.12.2
        provided
    
    
    
    
    
        io.cucumber
        cucumber-testng
        5.4.2
    
    
    
    
        com.theoryinpractise
        cucumber-testng-factory
        1.0.1
    
    
    
    
        com.google.guava
        guava
        27.1-jre
    
    
      
    

提交回复
热议问题