how to click programmatically on buttons on firefox with selenium with java
I have to click on buttons and I want to do that with a program.
This is my code so far.
Code:
package javaapplication102;
import java.io.IOException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class JavaApplication102 {
public static void main(String[] args) throws IOException {
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
}
}
and this is the errore I get
run:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function
at javaapplication102.JavaApplication102.main(JavaApplication102.java:11)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
what did I do wrong?
Re: how to click programmatically on buttons on firefox with selenium with java
Quote:
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
Where is the definition for the class named in the error message? Its definition needs to be on the classpath for the JVM.
Re: how to click programmatically on buttons on firefox with selenium with java
Quote:
Originally Posted by
Norm
Where is the definition for the class named in the error message? Its definition needs to be on the classpath for the JVM.
if dont have that, then?
Re: how to click programmatically on buttons on firefox with selenium with java
Go to the website that supports the org.openqa.selenium package and ask there.
Re: how to click programmatically on buttons on firefox with selenium with java
Quote:
Originally Posted by
Norm
Go to the website that supports the org.openqa.selenium package and ask there.
Ok.. Thanks :)