Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

On Windows not run tests for chrome, firefox, opera #4

Open
evgmoskalenko opened this issue Mar 1, 2016 · 4 comments
Open

On Windows not run tests for chrome, firefox, opera #4

evgmoskalenko opened this issue Mar 1, 2016 · 4 comments

Comments

@evgmoskalenko
Copy link

maybe need include the ChromeDriver location by PATH in DriverType.java?

Thanks.. :-)

01-03-2016 16:01:28.483 [TestNG] INFO  - starting autoTests.tests.web.someTests
01-03-2016 16:01:29.497 [TestNG] ERROR - FAIL autoTests.tests.ios.IosSocialApps.viberVersionApps
01-03-2016 16:01:29.506 [TestNG] ERROR - com.google.inject.CreationException: Unable to create injector, see the following errors:

1) An exception was caught and reported. Message: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
  at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)

1 error
    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
    at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
    at com.google.inject.Guice.createInjector(Guice.java:96)
    at com.google.inject.Guice.createInjector(Guice.java:73)
    at com.google.inject.Guice.createInjector(Guice.java:62)
    at autoTests.pages.internal.PageFactory.newInstance(PageFactory.java:9)
    at autoTests.tests.ios.IosSocialApps.viberVersionApps(IosSocialApps.java:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
    at org.testng.SuiteRunner.access$000(SuiteRunner.java:38)
    at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:382)
    at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
    at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:105)
    at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:89)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:139)
    at autoTests.apps.components.DriverType$2.getWebDriverObject(DriverType.java:51)
    at autoTests.apps.components.DriverType.instantiateWebDriver(DriverType.java:257)
    at autoTests.apps.components.DriverType.instantiate(DriverType.java:290)
    at autoTests.tests.internal.BaseTest$1.initialValue(BaseTest.java:50)
    at autoTests.tests.internal.BaseTest$1.initialValue(BaseTest.java:47)
    at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
    at java.lang.ThreadLocal.get(ThreadLocal.java:170)
    at autoTests.tests.internal.BaseTest.getDriver(BaseTest.java:64)
    at autoTests.apps.components.WebDriverGuiceModule.configure(WebDriverGuiceModule.java:16)
    at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
    at com.google.inject.spi.Elements.getElements(Elements.java:110)
    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
    ... 25 more
@jvanderwee
Copy link
Owner

Could you please open a pull request with a fix? I do not use Windows.

@evgmoskalenko evgmoskalenko changed the title On Windows not run tests for chrome On Windows not run tests for chrome, firefox, opera Mar 1, 2016
@evgmoskalenko
Copy link
Author

On MacOS - test is running, but I have decided to run tests on Unix or Windows platform in addition. I have found an issue on Unix & Windows platform. It's related with chromeDriver and firefoxDriver. I have used old version firefox for test. Firefox38 - https://www.mozilla.org/en-US/firefox/organizations/all/

Now, I do not know how to solve this problem, and I'm thinking about it. Maybe it is necessery to include the ChromeDriver location by PATH in project, or to add local path in config properties. I'm not totally understanding the code

@evgmoskalenko
Copy link
Author

I have solved this problem for chrome browser. I will make a pull request as soon as possible

@jvanderwee
Copy link
Owner

Great, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants