CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2016
    Posts
    1

    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?

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: how to click programmatically on buttons on firefox with selenium with java

    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.
    Norm

  3. #3
    Join Date
    Sep 2016
    Posts
    8

    Re: how to click programmatically on buttons on firefox with selenium with java

    Quote Originally Posted by Norm View Post
    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?

  4. #4
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    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.
    Norm

  5. #5
    Join Date
    Sep 2016
    Posts
    8

    Re: how to click programmatically on buttons on firefox with selenium with java

    Quote Originally Posted by Norm View Post
    Go to the website that supports the org.openqa.selenium package and ask there.
    Ok.. Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured