[英]NoSuchMethodError: org.openqa.selenium.remote.CommandInfo.<init>(Ljava/lang/String;Lorg/openqa/selenium/remote/HttpVerb;)V
i'm trying to run selendroid web for practice but i'm getting errors even i update selenium version (2.48.2) and set all paths correctly.我正在尝试运行 selendroid web 进行练习,但即使我更新 selenium 版本 (2.48.2) 并正确设置所有路径,我也会出错。
below is my code and i'm getting this error.下面是我的代码,我收到此错误。
Please help me...请帮我...
NoSuchMethodError: org.openqa.selenium.remote.CommandInfo.(Ljava/lang/String;Lorg/openqa/selenium/remote/HttpVerb;)V NoSuchMethodError: org.openqa.selenium.remote.CommandInfo.(Ljava/lang/String;Lorg/openqa/selenium/remote/HttpVerb;)V
package com.guru.test;
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
public class testWeb {
public WebDriver driver;
@BeforeSuite
public void setUp() throws Exception
{
DesiredCapabilities caps = SelendroidCapabilities.android();
driver = new SelendroidDriver(caps);
}
@Test
public void WebSiteTest() throws Exception
{
driver.get("http://google.com");
WebElement searchQuery = driver.findElement(By.name("q"));
searchQuery.click();
searchQuery.sendKeys("Test");
WebElement submit = driver.findElement(By.name("btnG"));
submit.click();
}
@AfterSuite
public void tearDown() throws Exception{
driver.quit();
}
}
I think you have mixed up selenium and selendroid jars.我想你把硒和硒罐搞混了。 selendroid-standalone + selendroid-client should be enough for this.
selendroid-standalone + selendroid-client应该足够了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.