Error: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver

0

This error appears when I run the test. I do not know how to solve it thanks for your help

  

Could not instantiate new WebDriver instance of type class   org.openqa.selenium.chrome.ChromeDriver

import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import net.serenitybdd.junit.runners.SerenityRunner;
import net.thucydides.core.annotations.Managed;
import net.thucydides.core.annotations.Steps;
import pasos.pasoscorreo;

@RunWith(SerenityRunner.class)
public class testcorreo {

    @Managed(driver = "chrome", uniqueSession = true)
    WebDriver driver;

    @Steps
    pasoscorreo buyer;

    @Test 
    public void Ingresar_Gmail_Valida_Correo_NoLeido() throws     
    InterruptedException {

    buyer.Abrir_Gmail();
    buyer.Ingresar_usairio("Ingsisacontreras");
    buyer.Ingresar_password("fdfdfd;");
    buyer.Buscar_correo("Alejandro Rendon ");
    buyer.UsuarioCon_correo();
    buyer.Ultimo_correo();
    buyer.Descripcion_Correo();
    driver.close();
}
    
asked by Andrés Felipe Contreras Muñoz 16.03.2018 в 17:35
source

1 answer

1

Maybe you need a properties file to tell serenity where the Chrome driver is located.

The serenity.properties file is created inside the serc / test / resources folder and has the following content:

# CHROME OPTIONS
webdriver.chrome.driver=webdrivers/chromedriver.exe
    
answered by 21.03.2018 / 16:54
source