SHARE
TWEET

Untitled

a guest Aug 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public <T extends WebDriver> T createChromeDriver()  {
  2.         String driverPath = new File("/home/build/drivers/chromedriver");
  3.         ChromeOptions options = new ChromeOptions();
  4.         System.setProperty(CHROME_DRIVER, driverPath);
  5. //            options.addArguments("--disable-extensions");
  6.             options.addArguments("headless");
  7.             options.addArguments("--disable-gpu");
  8.             options.addArguments("disable-infobars");
  9.             options.addArguments("--disable-extensions");
  10.             options.addArguments("window-size=1200x600");
  11.             options.addArguments("--no-sandbox");
  12.             options.addArguments("start-maximized");
  13.             options.addArguments("disable-notifications");
  14.             options.addArguments("allow-running-insecure-content");
  15.             return new ChromeDriver(options);
  16. }
  17.      
  18. java.lang.IllegalStateException: The driver executable does not exist: /home/build/drivers/chromedriver
  19.     at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
  20.     at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:137)
  21.     at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:132)
  22.     at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35)
  23.     at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:156)
  24.     at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:346)
  25.     at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:91)
  26.     at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157)
  27.     at com.intigua.automation.jet_patch.selenium_services.driver.SeleniumDriver.createChromeDriver(SeleniumDriver.java:130)
  28.     at com.intigua.automation.jet_patch.selenium_services.driver.SeleniumDriver.createDriver(SeleniumDriver.java:55)
  29.     at com.intigua.jet_patch.RailRunnerTest.setUp(RailRunnerTest.java:62)
  30.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  31.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  32.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  33.     at java.lang.reflect.Method.invoke(Method.java:498)
  34.     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
  35.     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  36.     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
  37.     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
  38.     at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  39.     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
  40.     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
  41.     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
  42.     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
  43.     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
  44.     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
  45.     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
  46.     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
  47.     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
  48.     at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
  49.     at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
  50.     at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
  51.     at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
  52.     at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
  53.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  54.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  55.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  56.     at java.lang.reflect.Method.invoke(Method.java:498)
  57.     at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
  58.     at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
  59.     at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
  60.     at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
  61.     at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
  62.  
  63. Results :
  64.  
  65. Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top