第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

嘗試使用 TestNG 和 WebDriverManager 運(yùn)行測(cè)試時(shí)出錯(cuò)

嘗試使用 TestNG 和 WebDriverManager 運(yùn)行測(cè)試時(shí)出錯(cuò)

回首憶惘然 2021-05-31 09:46:21
嘗試使用 TestNG 和 WebDriverManager 執(zhí)行測(cè)試時(shí)出現(xiàn)此錯(cuò)誤。我使用的依賴是https://github.com/bonigarcia/webdrivermanager-examples for Maven 中提到的依賴,TestNG 的版本是 6.14.3。我的代碼很簡(jiǎn)單:private WebDriver driver;@BeforeClasspublic void setupClass() {    WebDriverManager.chromedriver().setup();    driver = new ChromeDriver();}@AfterTestpublic void teardown() {    if (driver != null) {        driver.quit();    }}@Testpublic void test() {    // Your test code here}我得到這個(gè)錯(cuò)誤:[RemoteTestNG] detected TestNG version 6.14.3FAILED CONFIGURATION: @BeforeClass setupClassjava.lang.NoSuchMethodError: org.apache.http.impl.client.HttpClientBuilder.setConnectionManagerShared(Z)Lorg/apache/http/impl/client/HttpClientBuilder;at io.github.bonigarcia.wdm.HttpClient.<init>(HttpClient.java:97)at io.github.bonigarcia.wdm.HttpClient.<init>(HttpClient.java:91)at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:407)at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:215)at com.cuballama.automation.framework.Prueba.setupClass(Prueba.java:45)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.base/java.lang.reflect.Method.invoke(Method.java:564)at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)有任何想法嗎?
查看完整描述

2 回答

?
眼眸繁星

TA貢獻(xiàn)1873條經(jīng)驗(yàn) 獲得超9個(gè)贊

多挖一點(diǎn)后,我可以找到問題的原因。我在 Maven 中缺少一些依賴項(xiàng)。


<dependency> 

        <groupId>org.slf4j</groupId>

        <artifactId>slf4j-api</artifactId>

        <version>1.6.6</version>

    </dependency>

    <dependency>

        <groupId>org.slf4j</groupId>

        <artifactId>slf4j-simple</artifactId>

        <version>1.6.6</version>

    </dependency>


    <dependency>

        <groupId>net.sf.dozer</groupId>

        <artifactId>dozer</artifactId>

        <version>5.5.1</version>

        <exclusions>

            <exclusion>

                <artifactId>jcl-over-slf4j</artifactId>

                <groupId>org.slf4j</groupId>

            </exclusion>

            <exclusion>

                <artifactId>slf4j-api</artifactId>

                <groupId>org.slf4j</groupId>

            </exclusion>

        </exclusions>

    </dependency>




    <dependency>

        <groupId>org.apache.httpcomponents</groupId>

        <artifactId>httpclient</artifactId>

        <version>4.5.2</version>

    </dependency>


查看完整回答
反對(duì) 回復(fù) 2021-06-02
  • 2 回答
  • 0 關(guān)注
  • 190 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)