title: selenium firefox 52.0.2 along with intellij idea is crashing
body: <p>I'm using IntelliJ and selenium to automate a very simple test case but It's crashing in the beginning itself. </p>
  
  <p>Also, I tried changing the firefox browser to <code>46</code> but it still opens <code>52.0.2</code> and crashes. </p>
  
  <p>Questions:<br>
   - <strong><em>How can I get it to work?</em></strong><br>
   - <strong><em>How can I change the default browser firefox browser to 46 and not 52.0.2 on Mac?</em></strong></p>
  
  <p><strong><em>Code snippet</em></strong>:</p>
  
  <pre><code>import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.regex.Pattern;
  import java.util.concurrent.TimeUnit;
  
  import org.junit.*;
  
  import static org.junit.Assert.*;
  import static org.hamcrest.CoreMatchers.*;
  
  import org.openqa.selenium.*;
  import org.openqa.selenium.chrome.ChromeOptions;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.openqa.selenium.remote.DesiredCapabilities;
  import org.openqa.selenium.remote.RemoteWebDriver;
  import org.openqa.selenium.support.ui.Select;
  
  public class tt {
      private WebDriver driver;
      private String baseUrl;
      private boolean acceptNextAlert = true;
      private StringBuffer verificationErrors = new StringBuffer();
  
      @Before
      public void setUp() throws Exception {
  
          baseUrl = "https://github.com";
          loadFirefoxDriver();
          //loadChromeDriver();
          driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
      }
  
      private void loadFirefoxDriver() {
          driver = new FirefoxDriver();
      }
  
      private void loadChromeDriver() throws MalformedURLException {
          // To remove message "You are using an unsupported command-line flag: --ignore-certificate-errors.
          // Stability and security will suffer."
          // Add an argument 'test-type'
          DesiredCapabilities capabilities = DesiredCapabilities.chrome();
          ChromeOptions options = new ChromeOptions();
          options.addArguments("test-type");
          capabilities.setCapability(ChromeOptions.CAPABILITY, options);
          driver = new RemoteWebDriver(new URL("http://localhost:9515"), capabilities);
      }
  
      @Test
      public void testFirstSelenium() throws Exception {
          driver.get(baseUrl + "/codesolid");
          driver.findElement(By.linkText("tutorials")).click();
          assertEquals("Welcome to the CodeSolid Tutorials", driver.findElement(By.cssSelector("html body.logged_out.env-production.windows.vis-public div.wrapper div.site div.container div.repository-with-sidebar.repo-container.new-discussion-timeline.js-new-discussion-timeline.with-full-navigation div#js-repo-pjax-container.repository-content.context-loader-container div#readme.clearfix.announce.instapaper_body.md article.markdown-body.entry-content h1")).getText());
      }
  
      @After
      public void tearDown() throws Exception {
          driver.quit();
          String verificationErrorString = verificationErrors.toString();
          if (!"".equals(verificationErrorString)) {
              fail(verificationErrorString);
          }
      }
  
      private boolean isElementPresent(By by) {
          try {
              driver.findElement(by);
              return true;
          } catch (NoSuchElementException e) {
              return false;
          }
      }
  
      private boolean isAlertPresent() {
          try {
              driver.switchTo().alert();
              return true;
          } catch (NoAlertPresentException e) {
              return false;
          }
      }
  
      private String closeAlertAndGetItsText() {
          try {
              Alert alert = driver.switchTo().alert();
              String alertText = alert.getText();
              if (acceptNextAlert) {
                  alert.accept();
              } else {
                  alert.dismiss();
              }
              return alertText;
          } finally {
              acceptNextAlert = true;
          }
      }
  }
  </code></pre>
  
  <p><strong><em>Gradle</em></strong>:</p>
  
  <pre><code>/*
      build.gradle file for building and running Selenium tests
      Example uses:
      gradle clean test       - Rebuild and run tests
      gradle test             - Run tests only
      gradle cleanTest test   - Force tests to be run even if up to date
      gradle viewResults      - Displays the report of test results (Windows only)
  */
  
  // Support for building and testing
  apply plugin: 'java'
  
  // (Optional) configure name and version for jar
  jar {
      version  '1.0'
      baseName 'SeleniumStarter'
      extension '.jar'
  }
  
  // Cf. Maven properties
  ext.junitVersion = '4.11'
  ext.seleniumVersion = '2.41.0'
  
  
  // Cf. Maven &lt;dependencies&gt;
  dependencies {
      compile group: 'junit', name: 'junit', version: junitVersion
      compile group: 'org.seleniumhq.selenium', name: 'selenium-firefox-driver', version:seleniumVersion
      compile group: 'org.seleniumhq.selenium', name: 'selenium-chrome-driver', version:seleniumVersion
      compile group: 'org.seleniumhq.selenium', name: 'selenium-api', version:seleniumVersion
      compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:seleniumVersion
  }
  
  // A custom task to show report on tests that have run
  task viewResults(dependsOn: ['test'] , type:Exec) {
      workingDir './build/reports/tests'
      commandLine 'cmd', '/c', 'start index.html'
  }
  
  // Resolve Maven dependencies as Maven does
  repositories {
      mavenCentral()
      mavenLocal()
  }
  </code></pre>
  
  <p><strong><em>Error stacktrace</em></strong>:</p>
  
  <pre><code>1490969272079   geckodriver INFO    Listening on 127.0.0.1:14563
  1490969272652   mozprofile::profile INFO    Using profile path /var/folders/hd/4pn57v5x75b81hdv1nrg7tlw0000gq/T/rust_mozprofile.YiFu7gXew5Bk
  1490969272655   geckodriver::marionette INFO    Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args []
  1490969272668   geckodriver::marionette INFO    Connecting to Marionette on localhost:59730
  1490969273915   Marionette  INFO    Listening on port 59730
  Mar 31, 2017 7:37:55 PM org.openqa.selenium.remote.ProtocolHandshake createSession
  INFO: Detected dialect: W3C
  2017-03-31 19:37:56.008 plugin-container[3347:248694] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x963b, name = 'com.apple.tsm.portname'
  See /usr/include/servers/bootstrap_defs.h for the error codes.
  2017-03-31 19:37:56.013 plugin-container[3347:248694] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x9a03, name = 'com.apple.CFPasteboardClient'
  See /usr/include/servers/bootstrap_defs.h for the error codes.
  1490969277987   Marionette  INFO    New connections will no longer be accepted
  [Child 3347] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143
  [Child 3347] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143
  
  org.junit.ComparisonFailure: 
  Expected :Selenium WebDriver — Selenium Documentation
  Actual   :Selenium - Web Browser Automation
   &lt;Click to see difference&gt;
  
  
      at org.junit.Assert.assertEquals(Assert.java:115)
      at org.junit.Assert.assertEquals(Assert.java:144)
      at test_p.test.test(test.java:32)
      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:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
      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:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
  
  
  Process finished with exit code 255
  </code></pre>