{"action":"opened","issue":{"url":"https://api.github.com/repos/fhoeben/hsac-fitnesse-fixtures/issues/10","labels_url":"https://api.github.com/repos/fhoeben/hsac-fitnesse-fixtures/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/fhoeben/hsac-fitnesse-fixtures/issues/10/comments","events_url":"https://api.github.com/repos/fhoeben/hsac-fitnesse-fixtures/issues/10/events","html_url":"https://github.com/fhoeben/hsac-fitnesse-fixtures/issues/10","id":88051539,"number":10,"title":"Can't pass a boolean capability to the Selendroid WebDriver","user":{"login":"sglebs","id":1507221,"avatar_url":"https://avatars.githubusercontent.com/u/1507221?v=3","gravatar_id":"","url":"https://api.github.com/users/sglebs","html_url":"https://github.com/sglebs","followers_url":"https://api.github.com/users/sglebs/followers","following_url":"https://api.github.com/users/sglebs/following{/other_user}","gists_url":"https://api.github.com/users/sglebs/gists{/gist_id}","starred_url":"https://api.github.com/users/sglebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sglebs/subscriptions","organizations_url":"https://api.github.com/users/sglebs/orgs","repos_url":"https://api.github.com/users/sglebs/repos","events_url":"https://api.github.com/users/sglebs/events{/privacy}","received_events_url":"https://api.github.com/users/sglebs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-13T19:19:45Z","updated_at":"2015-06-13T19:19:45Z","closed_at":null,"body":"Hi @fhoeben ,\r\n\r\nI want to test selendroid http://selendroid.io/setup.html and for that I need to tell it to run things in the emulator, so I am using this:\r\n\r\n```\r\n|script              |selenium driver setup   |\r\n|connect to driver at|${url}|with capabilities|!{aut:io.selendroid.testapp, emulator: true}|\r\n```\r\n\r\nUnfortunately I get this error in Selendroid:\r\n\r\n```\r\nCaused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean\r\n```\r\n\r\nand that happens because of this code in Selendroid:\r\n\r\n```\r\n  public Boolean getEmulator() {\r\n    if (getRawCapabilities().get(EMULATOR) == null\r\n        || getRawCapabilities().get(EMULATOR).equals(JSONObject.NULL)) return null;\r\n    return getBooleanCapability(EMULATOR);\r\n  }\r\n\r\n  // throws exception if user didn't pass the capability as a boolean\r\n  private Boolean getBooleanCapability(String key) {\r\n    Object o = getRawCapabilities().get(key);\r\n    if (o == null) {\r\n      return null;\r\n    } else if (o instanceof Boolean) {\r\n      return (Boolean) o;\r\n    } else {\r\n      throw new ClassCastException(String.format(\r\n          \"DesiredCapability %s's value should be boolean: found value %s of type %s\", key, o.toString(), o.getClass()\r\n              .getName()));\r\n    }\r\n  }\r\n```\r\n\r\nSo, I need to put a * boolean* in that Hashtable, and not a string. But it does not seem to be possible to do this with FitNesse. Maybe this is why Xebium takes a JSON String?\r\n\r\nIf that is the case, perhaps you should also support a JSON-based API as well? I used to support it in my test fixture, but recently changed it to be like yours. Look at the red code in https://github.com/sglebs/BetDevFitNesse/commit/f46d9ed0db6348059a6395fecff74d4590fd1e54#diff-9990a6b7571fd450ab906375e1f1f9da to see how I was supporting the JSON-based capabilities.\r\n\r\nAny other suggestions?\r\n\r\n\r\n"}}