#ifndef CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_
#define CHROME_TEST_CHROMEDRIVER_ELEMENT_UTIL_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "chrome/test/chromedriver/basic_types.h"
namespace base {
class DictionaryValue;
class ListValue;
class Value;
}
struct Session;
class Status;
class WebView;
base::DictionaryValue* CreateElement(const std::string& element_id);
base::Value* CreateValueFrom(const WebPoint& point);
Status FindElement(
int interval_ms,
bool only_one,
const std::string* root_element_id,
Session* session,
WebView* web_view,
const base::DictionaryValue& params,
scoped_ptr<base::Value>* value);
Status GetActiveElement(
Session* session,
WebView* web_view,
scoped_ptr<base::Value>* value);
Status IsElementFocused(
Session* session,
WebView* web_view,
const std::string& element_id,
bool* is_focused);
Status GetElementAttribute(
Session* session,
WebView* web_view,
const std::string& element_id,
const std::string& attribute_name,
scoped_ptr<base::Value>* value);
Status IsElementAttributeEqualToIgnoreCase(
Session* session,
WebView* web_view,
const std::string& element_id,
const std::string& attribute_name,
const std::string& attribute_value,
bool* is_equal);
Status GetElementClickableLocation(
Session* session,
WebView* web_view,
const std::string& element_id,
WebPoint* location);
Status GetElementEffectiveStyle(
Session* session,
WebView* web_view,
const std::string& element_id,
const std::string& property_name,
std::string* property_value);
Status GetElementRegion(
Session* session,
WebView* web_view,
const std::string& element_id,
WebRect* rect);
Status GetElementTagName(
Session* session,
WebView* web_view,
const std::string& element_id,
std::string* name);
Status GetElementSize(
Session* session,
WebView* web_view,
const std::string& element_id,
WebSize* size);
Status IsElementDisplayed(
Session* session,
WebView* web_view,
const std::string& element_id,
bool ignore_opacity,
bool* is_displayed);
Status IsElementEnabled(
Session* session,
WebView* web_view,
const std::string& element_id,
bool* is_enabled);
Status IsOptionElementSelected(
Session* session,
WebView* web_view,
const std::string& element_id,
bool* is_selected);
Status IsOptionElementTogglable(
Session* session,
WebView* web_view,
const std::string& element_id,
bool* is_togglable);
Status SetOptionElementSelected(
Session* session,
WebView* web_view,
const std::string& element_id,
bool selected);
Status ToggleOptionElement(
Session* session,
WebView* web_view,
const std::string& element_id);
Status ScrollElementIntoView(
Session* session,
WebView* web_view,
const std::string& element_id,
WebPoint* location);
Status ScrollElementRegionIntoView(
Session* session,
WebView* web_view,
const std::string& element_id,
const WebRect& region,
bool center,
const std::string& clickable_element_id,
WebPoint* location);
#endif