code: @Override
      public WebDriverBrowser<?> create(Object obj) {
          try {
              WebDriverProperties webDriverProperties;
              if (obj instanceof Scriptable && "String".equals(((Scriptable) obj).getClassName())) {
                  obj = obj.toString();
              }
  
              if (obj instanceof String) {
                  webDriverProperties = new WebDriverProperties();
                  webDriverProperties.getDesiredCapabilities().put("browserName", obj);
              } else if (obj instanceof Scriptable) {
                  final Scriptable scriptable = (Scriptable) obj;
                  String json = engine.runWithContext(engine.new RhinoCallable<String, RuntimeException>() {
                      @Override
                      protected String doCall(Context cx, Scriptable scope) throws RuntimeException {
                          return (String) cx.evaluateString(scriptable, "JSON.stringify(this)", "<expression>", 1, null);
                      }
                  });
                  webDriverProperties = mapper.readValue(json, WebDriverProperties.class);
              } else {
                  throw new IllegalArgumentException("Only strings or maps are accepted");
              }
              WebDriver wd = webDriverFactory.create(webDriverProperties);
              WebModule webModule = combine(defaultModule(wd), WebModules.debugModule(), RhinoWebModules.rhinoModule());
              return new WebDriverBrowser<DefaultWebElements>(wd, DefaultWebElements.class, webModule);
          } catch (IOException e) {
              throw Throwables.propagate(e);
          }
      }
docs: /* (non-Javadoc)
  @see minium.script.rhinojs.JsWebDriverFactory#create(java.lang.Object)