forked from grails-samples/grails-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue grails-samples#24: added phantomjs as possible webdriver
make sure that you've installed http://http://phantomjs.org and start tests with grails -Dgeb.env=phantomjs test-app or - if you are using windows - with grails "-Dgeb.env=phantomjs" test-app Some of the tests will fail. It seems that this is because the test tries to set the object id through changing an <input type=hidden /> field. Phantomjs seems to not like this and throws an exception.
- Loading branch information
Showing
2 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |