WebDriver browser = GrapheneContext.getContextFor(Default.class).getWebDriver();
Graphene stores WebDriver instance in the thread-local context, distinguished by browser qualifier.
It enables to write framework-like features where context of the browser is injected just when you need it:
To access a browser session, you can obtain proxy of the context,
which is proxy object which delegates the methods you call on an instance which is at the time available in the context of current thread.
The most generic form is obtaining instance of WebDriver:
WebDriver browser = GrapheneContext.getContextFor(Default.class).getWebDriver();
The Default.class representas a browser's qualifier - in this case we are requesting default browser (when no qualifier is specified on Drone instances). Read more in Parallel browsers.
You can also use alternative methods, most notably the method which provides proxy object implementing given extension interfaces:
JavascriptExecutor executor = (JavascriptExecutor) GrapheneContext.getContextFor(Default.class).getWebDriver(JavascriptExecutor.class)