- qajanaki
- Posts : 4
Join date : 2012-04-13
I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Fri May 18, 2012 7:14 pm
Hi,
I tried out the sample prog in selenium webdriver.
the code is this,
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Test_App {
/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
WebDriver d1 = new FirefoxDriver();
d1.get("http://www.yahoo.com");
WebDriver d2 = new FirefoxDriver();
d2.get("http://www.bbc.com");
System.out.println(d1.getTitle());
System.out.println(d2.getTitle());
d1.quit();
d2.quit();
}
}
----------------------------------------
but when i tried to run it, I was getting the following error.
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
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)
... 1 more.
Can anyone help me out.
What are the drivers that i need to add on further.
Thanks in advance.
janaki.
I tried out the sample prog in selenium webdriver.
the code is this,
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Test_App {
/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
WebDriver d1 = new FirefoxDriver();
d1.get("http://www.yahoo.com");
WebDriver d2 = new FirefoxDriver();
d2.get("http://www.bbc.com");
System.out.println(d1.getTitle());
System.out.println(d2.getTitle());
d1.quit();
d2.quit();
}
}
----------------------------------------
but when i tried to run it, I was getting the following error.
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
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)
... 1 more.
Can anyone help me out.
What are the drivers that i need to add on further.
Thanks in advance.
janaki.
- ashish_techieAmateur
- Posts : 73
Join date : 2011-08-09
Re: I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Sat May 19, 2012 9:46 am
Which version of selenium and firefox are you using.
What is your OS?
Have you included all jars of selenium in your project or just 2?
Regards
Ashish
For selenium training visit:
http://qtpselenium.com/selenium-training
What is your OS?
Have you included all jars of selenium in your project or just 2?
Regards
Ashish
For selenium training visit:
http://qtpselenium.com/selenium-training
Re: I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Sat May 19, 2012 11:52 am
You need to include selenium server 2.21.0.
You have included java language driver.
It will solve your problem.
You have included java language driver.
It will solve your problem.
- qajanaki
- Posts : 4
Join date : 2012-04-13
Re: I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Sat May 19, 2012 12:24 pm
Hi,
I have included the following jar files
selenium server 2.21.0.
selenium-java-2.21.0-scrs.jar
webdriver-selenium-0.9.7089-sources.jar
selenium-firefox-driver-2.0a4.jar
Java Version is 1.6.0_30
Firefox version is Firefox 12.0
Do i need to add nuget tool in visual studio to install selenium webdriver.
Thanks,
Janaki
I have included the following jar files
selenium server 2.21.0.
selenium-java-2.21.0-scrs.jar
webdriver-selenium-0.9.7089-sources.jar
selenium-firefox-driver-2.0a4.jar
Java Version is 1.6.0_30
Firefox version is Firefox 12.0
Do i need to add nuget tool in visual studio to install selenium webdriver.
Thanks,
Janaki
Re: I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Sat May 19, 2012 12:30 pm
selenium server 2.21.0.
selenium-java-2.21.0-srcs
selenium-java-2.21.0
with these three jar file you can run your web-driver script successfully.
selenium-java-2.21.0-srcs
selenium-java-2.21.0
with these three jar file you can run your web-driver script successfully.
- ashish_techieAmateur
- Posts : 73
Join date : 2011-08-09
Re: I downloaded and installed Selenium WebDriver Jar files in my Eclipse, but still i am facing issues and couldn't run the webdriver scripsts.
Sat May 19, 2012 1:11 pm
ur adding similar jars twice.
1) Exculde all these jars from eclipse
2) Start fresh
3) Download all jars from this location.
4) extract
5) After extracting there will be 2 jars and a lib folder having lots of other jars
6) Include all the jars in eclipse - 2 jars and lib jars - all jars
7) Try after that
Regards
Ashish
For selenium training visit:
http://qtpselenium.com/selenium-training
1) Exculde all these jars from eclipse
2) Start fresh
3) Download all jars from this location.
4) extract
5) After extracting there will be 2 jars and a lib folder having lots of other jars
6) Include all the jars in eclipse - 2 jars and lib jars - all jars
7) Try after that
Regards
Ashish
For selenium training visit:
http://qtpselenium.com/selenium-training
Permissions in this forum:
You cannot reply to topics in this forum