Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.Response


  protected KnownElements getKnownElements() {
    return sessions.get(sessionId).getKnownElements();
  }

  protected Response newResponse() {
    return new Response(sessionId, context);
  }
View Full Code Here


    public List<WebElement> findElementsByCssSelector(String using) {
      return findElements("css selector", using);
    }

    public Point getLocationOnScreenOnceScrolledIntoView() {
            Response response = execute(DriverCommand.GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW,
                ImmutableMap.of("id", getId()));

            @SuppressWarnings("unchecked")
            Map<String, Number> mapped = (Map<String, Number>) response.getValue();

            return new Point(mapped.get("x").intValue(), mapped.get("y").intValue());
    }
View Full Code Here

            .dismiss();
        throw new UnhandledAlertException(driverCommand.toString());
      }
    }

    Response response = super.execute(driverCommand, parameters);

    Object rawResponse = response.getValue();
    if (rawResponse instanceof Map) {
      Map map = (Map) rawResponse;
      if (map.containsKey("__webdriverType")) {
        // Looks like have an alert. construct it
        currentAlert = new FirefoxAlert((String) map.get("text"));
        response.setValue(null);
      }
    }

    return response;
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.