title: Geb how to auto populate username/password prompts
body: <p>I'm using geb with spock as my acceptance test framework. Everything is going great except that there is an issue with a couple of tests where when it redirects to another website we are prompted to enter a username and password to access the site. Because this is a browser prompt rather than a form I can submit, is there any way you can set this either automatically on the browser profile for the site or set it on the driver?</p>
  
  <p>I'm testing with firefox as the browser type.</p>
  
  <p>Edit: here's my build.gradle file</p>
  
  <pre><code>apply plugin: 'eclipse'
  apply plugin: 'groovy'
  apply plugin: 'idea'
  
  repositories {
      mavenCentral()
  }
  
  task wrapper(type: Wrapper) {
      gradleVersion = '1.3'
  }
  
  // The drivers we want to use
  ext.drivers = ["firefox"]
  
  dependencies {
      groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.6'
  
      def gebVersion = "0.7.2"
      def seleniumVersion = "2.26.0"
  
      // If using Spock, need to depend on geb-spock
      testCompile "org.codehaus.geb:geb-spock:$gebVersion"
      testCompile "org.spockframework:spock-core:0.6-groovy-1.8"
  
  // Drivers
      drivers.each { driver -&gt;
          testCompile "org.seleniumhq.selenium:selenium-$driver-driver:$seleniumVersion"
      }
  }
  
  drivers.each { driver -&gt;
      task "${driver}Test"(type: Test) {
          testReportDir = reporting.file("$name/tests")
          testResultsDir = file("$buildDir/test-results/$name")
  
          systemProperty "geb.build.reportsDir", reporting.file("$name/geb")
          systemProperty "geb.env", driver
          // If you wanted to set the baseUrl in your build…
          // systemProperty "geb.build.baseUrl", "http://myapp.com"
      }
  }
  
  task test(overwrite: true, dependsOn: drivers.collect { tasks["${it}Test"] })
  </code></pre>