当我使用下面的代码时,我在驱动程序对象创建者上遇到错误。
import org.openqa.selenium.WebDriver;
import org.testng.annotations.Test;
import io.github.bonigarcia.wdm.ChromeDriverManager;
public class NewTest {
private WebDriver driver;
public static void Setup()
{
ChromeDriverManager.getInstance().setup();
}
@Test
public void f()
{
driver = new ChromeDriver(); //**error-> ChromeDriver cannot be resolved to a type.
}
}