I have the following lines:
import static org.junit.Assert.*;
import org.openqa.selenium.WebElement;
public class ClasseTeste extends Navegadores {
public static void verificarTitulo() {
abrirChrome();
String titulo = driver.getTitle();
assertTrue(titulo.contains("google"));
fecharNavegador();
}
}
So how do I run main:
public static void main( String[] args ) {
verificarTitulo();
}
This occurs:
Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/Assert
at teste.NovoProjeto.ClasseTeste.verificarTitulo(ClasseTeste.java:11)
at teste.NovoProjeto.Main.main(Main.java:8)
Caused by: java.lang.ClassNotFoundException: org.junit.Assert
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Can anyone help me with this?