Created
May 16, 2012 04:16
-
-
Save zachlendon/2707341 to your computer and use it in GitHub Desktop.
MobileSpec
This file contains hidden or 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
| class MobileSpec extends GebReportingSpec { | |
| @Shared | |
| def isMobile = false | |
| def setupSpec() { | |
| if (getBrowser().driver instanceof RemoteWebDriver) { | |
| RemoteWebDriver remoteWebDriver = getBrowser().driver | |
| DesiredCapabilities capabilities = remoteWebDriver.getCapabilities() | |
| if (["android", "iPhone", "iPad"].contains(capabilities.browserName)) { | |
| isMobile = true | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment