{"action":"created","issue":{"url":"https://api.github.com/repos/selendroid/selendroid/issues/892","labels_url":"https://api.github.com/repos/selendroid/selendroid/issues/892/labels{/name}","comments_url":"https://api.github.com/repos/selendroid/selendroid/issues/892/comments","events_url":"https://api.github.com/repos/selendroid/selendroid/issues/892/events","html_url":"https://github.com/selendroid/selendroid/issues/892","id":88052058,"number":892,"title":"Please allow a true/Boolean capability to be defined with the string \"true\"","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":3,"created_at":"2015-06-13T19:24:02Z","updated_at":"2015-06-14T16:17:17Z","closed_at":null,"body":"I am trying to use Selendroid from FitNesse https://github.com/fhoeben/hsac-fitnesse-fixtures/issues/10 but it passes \"true\" down. Can we please change this code below (in SelendroidCapabilities) so that it also takes the string \"true\" as a valid boolean/true value?\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\nThanks for listening!\r\n"},"comment":{"url":"https://api.github.com/repos/selendroid/selendroid/issues/comments/111843954","html_url":"https://github.com/selendroid/selendroid/issues/892#issuecomment-111843954","issue_url":"https://api.github.com/repos/selendroid/selendroid/issues/892","id":111843954,"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},"created_at":"2015-06-14T16:17:17Z","updated_at":"2015-06-14T16:17:17Z","body":"I like @fhoeben 's suggestion. Less code and more versatile. Great!"}}