Skip to content

Commit

Permalink
Merge pull request #26 from rdmueller/master
Browse files Browse the repository at this point in the history
issue #24: added phantomjs as possible webdriver
  • Loading branch information
graemerocher committed Jun 16, 2015
2 parents 1c3bc8d + 7976d90 commit 25c0dcc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
11 changes: 8 additions & 3 deletions grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ grails.project.dependency.resolution = {
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0-grails-2.4"

test "org.gebish:geb-spock:$gebVersion"
test "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
test "org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion"
test "org.gebish:geb-spock:$gebVersion"
test "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
// we need ghostdriver for phantomjs...
test( "com.github.detro.ghostdriver:phantomjsdriver:1.1.0" ) {
transitive = false
}
test "org.seleniumhq.selenium:selenium-htmlunit-driver:$seleniumVersion"
test ("org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion") // Needed by phantomjsdriver
}

plugins {
Expand Down
15 changes: 15 additions & 0 deletions test/functional/GebConfig.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import org.openqa.selenium.htmlunit.HtmlUnitDriver

import org.openqa.selenium.phantomjs.PhantomJSDriver
import org.openqa.selenium.remote.DesiredCapabilities
import org.openqa.selenium.Dimension

driver = {
new HtmlUnitDriver()
}

environments {
// run as "grails -Dgeb.env=phantomjs test-app
phantomjs {
driver = {
def driver = new PhantomJSDriver(new DesiredCapabilities())
driver.manage().window().setSize(new Dimension(1028, 100))
driver
}
}
}

0 comments on commit 25c0dcc

Please sign in to comment.