Working with different browser drivers with Selenium Webdriver

Working with different browser drivers with Selenium Webdriver 20 min

  

This tutorial will explain how to write a selenium script to launch different browsers with selenium and also the configurations, versions to be maintained.

QA Section

Speak Your Mind


shivani

Hello sir, i am doing same as you explain in did video and i am getting the below error- Exception in thread "main" java.util.ServiceConfigurationError: org.openqa.selenium.remote.http.HttpClient$Factory: Provider org.openqa.selenium.remote.http.okhttp.OkHttpClient$Factory could not be instantiated at java.util.ServiceLoader.fail(Unknown Source) at java.util.ServiceLoader.access$100(Unknown Source) at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source) at java.util.ServiceLoader$LazyIterator.next(Unknown Source) at java.util.ServiceLoader$1.next(Unknown Source) at java.util.Spliterators$IteratorSpliterator.trySplit(Unknown Source) at java.util.stream.AbstractTask.compute(Unknown Source) at java.util.concurrent.CountedCompleter.exec(Unknown Source) at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source) at java.util.concurrent.ForkJoinTask.invoke(Unknown Source) at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.collect(Unknown Source) at org.openqa.selenium.remote.http.HttpClient$Factory.create(HttpClient.java:52) at org.openqa.selenium.remote.http.HttpClient$Factory.createDefault(HttpClient.java:70) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:47) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:163) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:150) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:105) at Browsers.main(Browsers.java:8) Caused by: java.lang.NoClassDefFoundError: okhttp3/ConnectionPool at org.openqa.selenium.remote.http.okhttp.OkHttpClient$Factory.(OkHttpClient.java:76) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) ... 19 more Caused by: java.lang.ClassNotFoundException: okhttp3.ConnectionPool 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) ... 25 more Could you plz explain what i do to correct it?

Reply
  • Trainer

    Version of your chrome driver exe is not correct version of your browser. Please download correct chrome driver exe.

    Reply