Open lukeis opened 8 years ago
It's undocumented, but most of the driver's support this (HtmlUnit is the exception,
IIRC). You'll get a Map<String, Object> though, not a JSONObject.
Map<String, Integer> map = (Map<String, Integer>) ((JavascriptExecutor) driver).executeScript("return
{foo: 1, bar: 2}");
System.out.printf("foo: %d\n", map.get("foo"));
System.out.printf("bar: %d\n", map.get("bar"));
Reported by jmleyba
on 2012-12-26 20:07:18
Hi!
Am i right that it's just documentaion request?
Is possibility to return a map enough?
Reported by a.u.savchuk
on 2013-09-07 20:07:11
Reported by luke.semerau
on 2015-09-17 17:45:10
Originally reported on Google Code with ID 4945
Reported by
yuchang.guo
on 2012-12-25 03:36:41