WD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
webdriver::QWidgetViewCmdExecutor Class Reference

#include <widget_view_executor.h>

Inheritance diagram for webdriver::QWidgetViewCmdExecutor:
Collaboration diagram for webdriver::QWidgetViewCmdExecutor:

Public Member Functions

 QWidgetViewCmdExecutor (Session *session, ViewId viewId)
 
virtual ~QWidgetViewCmdExecutor ()
 
virtual void CanHandleUrl (const std::string &url, bool *can, Error **error)
 
virtual void GoForward (Error **error) NOT_SUPPORTED_IMPL
 
virtual void GoBack (Error **error) NOT_SUPPORTED_IMPL
 
virtual void Reload (Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetSource (std::string *source, Error **error)
 
virtual void SendKeys (const ElementId &element, const string16 &keys, Error **error)
 
virtual void GetElementScreenShot (const ElementId &element, std::string *png, Error **error)
 
virtual void MouseDoubleClick (Error **error)
 
virtual void MouseButtonUp (Error **error)
 
virtual void MouseButtonDown (Error **error)
 
virtual void MouseClick (MouseButton button, Error **error)
 
virtual void MouseWheel (const int delta, Error **error)
 
virtual void MouseMove (const int x_offset, const int y_offset, Error **error)
 
virtual void MouseMove (const ElementId &element, int x_offset, const int y_offset, Error **error)
 
virtual void MouseMove (const ElementId &element, Error **error)
 
virtual void ClickElement (const ElementId &element, Error **error)
 
virtual void GetAttribute (const ElementId &element, const std::string &key, base::Value **value, Error **error)
 
virtual void ClearElement (const ElementId &element, Error **error)
 
virtual void IsElementDisplayed (const ElementId &element, bool ignore_opacity, bool *is_displayed, Error **error)
 
virtual void IsElementEnabled (const ElementId &element, bool *is_enabled, Error **error)
 
virtual void ElementEquals (const ElementId &element1, const ElementId &element2, bool *is_equal, Error **error)
 
virtual void GetElementLocation (const ElementId &element, Point *location, Error **error)
 
virtual void GetElementLocationInView (const ElementId &element, Point *location, Error **error)
 
virtual void GetElementTagName (const ElementId &element, std::string *tag_name, Error **error)
 
virtual void IsOptionElementSelected (const ElementId &element, bool *is_selected, Error **error)
 
virtual void SetOptionElementSelected (const ElementId &element, bool selected, Error **error)
 
virtual void GetElementSize (const ElementId &element, Size *size, Error **error)
 
virtual void ElementSubmit (const ElementId &element, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetElementText (const ElementId &element, std::string *element_text, Error **error)
 
virtual void GetElementCssProperty (const ElementId &element, const std::string &property, base::Value **value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void FindElements (const ElementId &root_element, const std::string &locator, const std::string &query, std::vector< ElementId > *elements, Error **error)
 
virtual void ActiveElement (ElementId *element, Error **error)
 
virtual void SwitchToFrameWithNameOrId (const std::string &name_or_id, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SwitchToFrameWithIndex (int index, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SwitchToFrameWithElement (const ElementId &element, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SwitchToTopFrame (Error **error) NOT_SUPPORTED_IMPL
 
virtual void SwitchToTopFrameIfCurrentFrameInvalid (Error **error) NOT_SUPPORTED_IMPL
 
virtual void NavigateToURL (const std::string &url, bool sync, Error **error)
 
virtual void GetURL (std::string *url, Error **error)
 
virtual void ExecuteScript (const std::string &script, const base::ListValue *const args, base::Value **value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void ExecuteAsyncScript (const std::string &script, const base::ListValue *const args, base::Value **value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetAppCacheStatus (int *status, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetCookies (const std::string &url, base::ListValue **cookies, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SetCookie (const std::string &url, base::DictionaryValue *cookie_dict, Error **error) NOT_SUPPORTED_IMPL
 
virtual void DeleteCookie (const std::string &url, const std::string &cookie_name, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetStorageKeys (StorageType type, base::ListValue **keys, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SetStorageItem (StorageType type, const std::string &key, const std::string &value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void ClearStorage (StorageType type, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetStorageItem (StorageType type, const std::string &key, std::string *value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void RemoveStorageItem (StorageType type, const std::string &key, std::string *value, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetStorageSize (StorageType type, int *size, Error **error) NOT_SUPPORTED_IMPL
 
virtual void GetGeoLocation (base::DictionaryValue **geolocation, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SetGeoLocation (const base::DictionaryValue *geolocation, Error **error) NOT_SUPPORTED_IMPL
 
virtual void TouchClick (const ElementId &element, Error **error)
 
virtual void TouchDoubleClick (const ElementId &element, Error **error)
 
virtual void TouchDown (const int &x, const int &y, Error **error)
 
virtual void TouchUp (const int &x, const int &y, Error **error)
 
virtual void TouchMove (const int &x, const int &y, Error **error)
 
virtual void TouchLongClick (const ElementId &element, Error **error)
 
virtual void TouchScroll (const int &xoffset, const int &yoffset, Error **error) NOT_SUPPORTED_IMPL
 
virtual void TouchScroll (const ElementId &element, const int &xoffset, const int &yoffset, Error **error)
 
virtual void TouchFlick (const int &xSpeed, const int &ySpeed, Error **error) NOT_SUPPORTED_IMPL
 
virtual void TouchFlick (const ElementId &element, const int &xoffset, const int &yoffset, const int &speed, Error **error)
 
virtual void GetPlayerState (const ElementId &element, PlayerState *, Error **error)
 
virtual void SetPlayerState (const ElementId &element, PlayerState, Error **error)
 
virtual void GetPlayerVolume (const ElementId &element, double *, Error **error)
 
virtual void SetPlayerVolume (const ElementId &element, double, Error **error)
 
virtual void GetPlayingPosition (const ElementId &element, double *, Error **error)
 
virtual void SetPlayingPosition (const ElementId &element, double, Error **error)
 
virtual void SetMute (const ElementId &element, bool, Error **error)
 
virtual void GetMute (const ElementId &element, bool *, Error **error)
 
virtual void SetPlaybackSpeed (const ElementId &element, double, Error **)
 
virtual void GetPlaybackSpeed (const ElementId &element, double *, Error **)
 
virtual void VisualizerSource (std::string *source, Error **error)
 
virtual void VisualizerShowPoint (Error **error) NOT_SUPPORTED_IMPL
 
virtual void TouchPinchZoom (const ElementId &element, const double &scale, Error **error) NOT_SUPPORTED_IMPL
 
virtual void TouchPinchRotate (const ElementId &element, const int &angle, Error **error) NOT_SUPPORTED_IMPL
 
virtual void SetOnline (bool, Error **error) NOT_SUPPORTED_IMPL
 
virtual void IsOnline (bool *, Error **error) NOT_SUPPORTED_IMPL
 
- Public Member Functions inherited from webdriver::QViewCmdExecutor
 QViewCmdExecutor (Session *session, ViewId viewId)
 
virtual ~QViewCmdExecutor ()
 
virtual void GetTitle (std::string *title, Error **error)
 
virtual void GetWindowName (std::string *name, Error **error)
 
virtual void GetBounds (Rect *bounds, Error **error)
 
virtual void SetBounds (const Rect &bounds, Error **error)
 
virtual void Maximize (Error **error)
 
virtual void GetScreenShot (std::string *png, Error **error)
 
virtual void SendKeys (const string16 &keys, Error **error)
 
virtual void Close (Error **error)
 
virtual void SwitchTo (Error **error)
 
virtual void FindElement (const ElementId &root_element, const std::string &locator, const std::string &query, ElementId *element, Error **error)
 
virtual void GetAlertMessage (std::string *text, Error **error)
 
virtual void SetAlertPromptText (const std::string &alert_prompt_text, Error **error)
 
virtual void AcceptOrDismissAlert (bool accept, Error **error)
 
virtual void SetOrientation (const std::string &orientation, Error **error)
 
virtual void GetOrientation (std::string *orientation, Error **error)
 
- Public Member Functions inherited from webdriver::ViewCmdExecutor
 ViewCmdExecutor (Session *session, ViewId viewId)
 
virtual ~ViewCmdExecutor ()
 
virtual void GetBrowserLog (base::ListValue **browserLog, Error **error)
 

Protected Member Functions

QObjectgetElement (const ElementId &element, Error **error)
 
QWidget * getWidget (const ElementId &element, Error **error)
 
bool MatchNativeElement (const QObject *item, const std::string &locator, const std::string &query)
 
void FindNativeElementsByXpath (QWidget *parent, const std::string &query, std::vector< ElementId > *elements, Error **error)
 
- Protected Member Functions inherited from webdriver::QViewCmdExecutor
QWidget * getView (const ViewId &viewId, Error **error)
 
QTouchEvent::TouchPoint createTouchPoint (Qt::TouchPointState state, QPointF &point)
 
QTouchEvent * createSimpleTouchEvent (QEvent::Type eventType, Qt::TouchPointStates touchPointStates, QPointF point)
 
QTouchEvent * createTouchEvent (QEvent::Type eventType, Qt::TouchPointStates touchPointStates, const QList< QTouchEvent::TouchPoint > &touchPoints)
 
QTouchEvent * create2PointTouchEvent (QEvent::Type eventType, Qt::TouchPointStates touchPointStates, QPointF &point1, QPointF &point2)
 
QTouchEvent::TouchPoint createTouchPointWithId (Qt::TouchPointState state, QPointF &point, int id)
 
void saveScreenshot (QPixmap &pixmap, std::string *png, Error **error)
 

Additional Inherited Members

- Protected Attributes inherited from webdriver::QViewCmdExecutor
QTouchDevice touchDevice
 

Detailed Description

QWebView based view's implementation.

Constructor & Destructor Documentation

webdriver::QWidgetViewCmdExecutor::QWidgetViewCmdExecutor ( Session session,
ViewId  viewId 
)
explicit
virtual webdriver::QWidgetViewCmdExecutor::~QWidgetViewCmdExecutor ( )
virtual

Member Function Documentation

virtual void webdriver::QWidgetViewCmdExecutor::ActiveElement ( ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::CanHandleUrl ( const std::string &  url,
bool *  can,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ClearElement ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ClearStorage ( StorageType  type,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ClickElement ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::DeleteCookie ( const std::string &  url,
const std::string &  cookie_name,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ElementEquals ( const ElementId element1,
const ElementId element2,
bool *  is_equal,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ElementSubmit ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ExecuteAsyncScript ( const std::string &  script,
const base::ListValue *const  args,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::ExecuteScript ( const std::string &  script,
const base::ListValue *const  args,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::FindElements ( const ElementId root_element,
const std::string &  locator,
const std::string &  query,
std::vector< ElementId > *  elements,
Error **  error 
)
virtual
void webdriver::QWidgetViewCmdExecutor::FindNativeElementsByXpath ( QWidget *  parent,
const std::string &  query,
std::vector< ElementId > *  elements,
Error **  error 
)
protected
virtual void webdriver::QWidgetViewCmdExecutor::GetAppCacheStatus ( int *  status,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetAttribute ( const ElementId element,
const std::string &  key,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetCookies ( const std::string &  url,
base::ListValue **  cookies,
Error **  error 
)
virtual
QObject* webdriver::QWidgetViewCmdExecutor::getElement ( const ElementId element,
Error **  error 
)
protected
virtual void webdriver::QWidgetViewCmdExecutor::GetElementCssProperty ( const ElementId element,
const std::string &  property,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementLocation ( const ElementId element,
Point location,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementLocationInView ( const ElementId element,
Point location,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementScreenShot ( const ElementId element,
std::string *  png,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementSize ( const ElementId element,
Size size,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementTagName ( const ElementId element,
std::string *  tag_name,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetElementText ( const ElementId element,
std::string *  element_text,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetGeoLocation ( base::DictionaryValue **  geolocation,
Error **  error 
)
virtual

Gets the current geolocation.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::GetMute ( const ElementId element,
bool *  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetPlaybackSpeed ( const ElementId element,
double *  ,
Error **   
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetPlayerState ( const ElementId element,
PlayerState ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetPlayerVolume ( const ElementId element,
double *  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetPlayingPosition ( const ElementId element,
double *  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetSource ( std::string *  source,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetStorageItem ( StorageType  type,
const std::string &  key,
std::string *  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetStorageKeys ( StorageType  type,
base::ListValue **  keys,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetStorageSize ( StorageType  type,
int *  size,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GetURL ( std::string *  url,
Error **  error 
)
virtual
QWidget* webdriver::QWidgetViewCmdExecutor::getWidget ( const ElementId element,
Error **  error 
)
protected
virtual void webdriver::QWidgetViewCmdExecutor::GoBack ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::GoForward ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::IsElementDisplayed ( const ElementId element,
bool  ignore_opacity,
bool *  is_displayed,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::IsElementEnabled ( const ElementId element,
bool *  is_enabled,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::IsOnline ( bool *  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::IsOptionElementSelected ( const ElementId element,
bool *  is_selected,
Error **  error 
)
virtual
bool webdriver::QWidgetViewCmdExecutor::MatchNativeElement ( const QObject item,
const std::string &  locator,
const std::string &  query 
)
protected
virtual void webdriver::QWidgetViewCmdExecutor::MouseButtonDown ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::MouseButtonUp ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::MouseClick ( MouseButton  button,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::MouseDoubleClick ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::MouseMove ( const int  x_offset,
const int  y_offset,
Error **  error 
)
virtual

move mouse to position: cur_point + offset

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::MouseMove ( const ElementId element,
int  x_offset,
const int  y_offset,
Error **  error 
)
virtual

Move the mouse by an offset of the specificed element.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::MouseMove ( const ElementId element,
Error **  error 
)
virtual

the mouse will be moved to the center of the element

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::MouseWheel ( const int  delta,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::NavigateToURL ( const std::string &  url,
bool  sync,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::Reload ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::RemoveStorageItem ( StorageType  type,
const std::string &  key,
std::string *  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SendKeys ( const ElementId element,
const string16 &  keys,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetCookie ( const std::string &  url,
base::DictionaryValue *  cookie_dict,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetGeoLocation ( const base::DictionaryValue *  geolocation,
Error **  error 
)
virtual

Overrides the current geolocation.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::SetMute ( const ElementId element,
bool  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetOnline ( bool  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetOptionElementSelected ( const ElementId element,
bool  selected,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetPlaybackSpeed ( const ElementId element,
double  ,
Error **   
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetPlayerState ( const ElementId element,
PlayerState  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetPlayerVolume ( const ElementId element,
double  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetPlayingPosition ( const ElementId element,
double  ,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SetStorageItem ( StorageType  type,
const std::string &  key,
const std::string &  value,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::SwitchToFrameWithElement ( const ElementId element,
Error **  error 
)
virtual

Switches to the frame identified by the given |element|. The element must be either an IFRAME or FRAME element.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::SwitchToFrameWithIndex ( int  index,
Error **  error 
)
virtual

Switches the frame used by default. |index| is the zero-based frame index.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::SwitchToFrameWithNameOrId ( const std::string &  name_or_id,
Error **  error 
)
virtual

Switches the frame used by default. |name_or_id| is either the name or id of a frame element.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::SwitchToTopFrame ( Error **  error)
virtual

Switches the target frame to the topmost frame.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::SwitchToTopFrameIfCurrentFrameInvalid ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchClick ( const ElementId element,
Error **  error 
)
virtual

Touch commands emulation.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWidgetViewCmdExecutor::TouchDoubleClick ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchDown ( const int &  x,
const int &  y,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchFlick ( const int &  xSpeed,
const int &  ySpeed,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchFlick ( const ElementId element,
const int &  xoffset,
const int &  yoffset,
const int &  speed,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchLongClick ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchMove ( const int &  x,
const int &  y,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchPinchRotate ( const ElementId element,
const int &  angle,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchPinchZoom ( const ElementId element,
const double &  scale,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchScroll ( const int &  xoffset,
const int &  yoffset,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchScroll ( const ElementId element,
const int &  xoffset,
const int &  yoffset,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::TouchUp ( const int &  x,
const int &  y,
Error **  error 
)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::VisualizerShowPoint ( Error **  error)
virtual
virtual void webdriver::QWidgetViewCmdExecutor::VisualizerSource ( std::string *  source,
Error **  error 
)
virtual

The documentation for this class was generated from the following file: