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

#include <web_view_executor.h>

Inheritance diagram for webdriver::QWebViewCmdExecutor:
Collaboration diagram for webdriver::QWebViewCmdExecutor:

Public Member Functions

 QWebViewCmdExecutor (Session *session, ViewId viewId)
 
virtual ~QWebViewCmdExecutor ()
 
virtual void CanHandleUrl (const std::string &url, bool *can, Error **error)
 
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 GoForward (Error **error)
 
virtual void GoBack (Error **error)
 
virtual void Reload (Error **error)
 
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)
 
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)
 
virtual void FindElement (const ElementId &root_element, const std::string &locator, const std::string &query, ElementId *element, Error **error)
 
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 SwitchTo (Error **error)
 
virtual void SwitchToFrameWithNameOrId (const std::string &name_or_id, Error **error)
 
virtual void SwitchToFrameWithIndex (int index, Error **error)
 
virtual void SwitchToFrameWithElement (const ElementId &element, Error **error)
 
virtual void SwitchToTopFrame (Error **error)
 
virtual void SwitchToTopFrameIfCurrentFrameInvalid (Error **error)
 
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)
 
virtual void ExecuteAsyncScript (const std::string &script, const base::ListValue *const args, base::Value **value, Error **error)
 
virtual void GetAppCacheStatus (int *status, Error **error)
 
virtual void GetCookies (const std::string &url, base::ListValue **cookies, Error **error)
 
virtual void SetCookie (const std::string &url, base::DictionaryValue *cookie_dict, Error **error)
 
virtual void DeleteCookie (const std::string &url, const std::string &cookie_name, Error **error)
 
virtual void GetStorageKeys (StorageType type, base::ListValue **keys, Error **error)
 
virtual void SetStorageItem (StorageType type, const std::string &key, const std::string &value, Error **error)
 
virtual void ClearStorage (StorageType type, Error **error)
 
virtual void GetStorageItem (StorageType type, const std::string &key, std::string *value, Error **error)
 
virtual void RemoveStorageItem (StorageType type, const std::string &key, std::string *value, Error **error)
 
virtual void GetStorageSize (StorageType type, int *size, Error **error)
 
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)
 
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)
 
virtual void TouchFlick (const ElementId &element, const int &xoffset, const int &yoffset, const int &speed, Error **error)
 
virtual void GetBrowserLog (base::ListValue **browserLog, Error **error)
 
virtual void GetPlayerState (const ElementId &element, PlayerState *, Error **)
 
virtual void SetPlayerState (const ElementId &element, PlayerState, Error **)
 
virtual void GetPlayerVolume (const ElementId &element, double *, Error **)
 
virtual void SetPlayerVolume (const ElementId &element, double, Error **)
 
virtual void GetPlayingPosition (const ElementId &element, double *, Error **)
 
virtual void SetPlayingPosition (const ElementId &element, double, Error **)
 
virtual void SetPlaybackSpeed (const ElementId &element, double, Error **)
 
virtual void GetPlaybackSpeed (const ElementId &element, double *, Error **)
 
virtual void SetMute (const ElementId &element, bool, Error **)
 
virtual void GetMute (const ElementId &element, bool *, Error **)
 
virtual void VisualizerSource (std::string *source, Error **error)
 
virtual void VisualizerShowPoint (Error **error)
 
virtual void SetOnline (bool, Error **error)
 
virtual void IsOnline (bool *, Error **error)
 
virtual void TouchPinchZoom (const ElementId &element, const double &scale, Error **error)
 
virtual void TouchPinchRotate (const ElementId &element, const int &angle, Error **error)
 
- Public Member Functions inherited from webdriver::QViewCmdExecutor
 QViewCmdExecutor (Session *session, ViewId viewId)
 
virtual ~QViewCmdExecutor ()
 
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 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 ()
 

Protected Member Functions

QWebViewgetView (const ViewId &viewId, 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)
 

Friends

class QWebViewVisualizerSourceCommand
 
class QWebViewVisualizerShowPointCommand
 

Additional Inherited Members

- Protected Attributes inherited from webdriver::QViewCmdExecutor
QTouchDevice touchDevice
 

Detailed Description

QWebView based view's implementation.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void webdriver::QWebViewCmdExecutor::ActiveElement ( ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::CanHandleUrl ( const std::string &  url,
bool *  can,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ClearElement ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ClearStorage ( StorageType  type,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ClickElement ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::DeleteCookie ( const std::string &  url,
const std::string &  cookie_name,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ElementEquals ( const ElementId element1,
const ElementId element2,
bool *  is_equal,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ElementSubmit ( const ElementId element,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ExecuteAsyncScript ( const std::string &  script,
const base::ListValue *const  args,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::ExecuteScript ( const std::string &  script,
const base::ListValue *const  args,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::FindElement ( const ElementId root_element,
const std::string &  locator,
const std::string &  query,
ElementId element,
Error **  error 
)
virtual

Reimplemented from webdriver::QViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::FindElements ( const ElementId root_element,
const std::string &  locator,
const std::string &  query,
std::vector< ElementId > *  elements,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetAppCacheStatus ( int *  status,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetAttribute ( const ElementId element,
const std::string &  key,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetBounds ( Rect bounds,
Error **  error 
)
virtual

Reimplemented from webdriver::QViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::GetBrowserLog ( base::ListValue **  browserLog,
Error **  error 
)
virtual

Reimplemented from webdriver::ViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::GetCookies ( const std::string &  url,
base::ListValue **  cookies,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementCssProperty ( const ElementId element,
const std::string &  property,
base::Value **  value,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementLocation ( const ElementId element,
Point location,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementLocationInView ( const ElementId element,
Point location,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementScreenShot ( const ElementId element,
std::string *  png,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementSize ( const ElementId element,
Size size,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementTagName ( const ElementId element,
std::string *  tag_name,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetElementText ( const ElementId element,
std::string *  element_text,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetGeoLocation ( base::DictionaryValue **  geolocation,
Error **  error 
)
virtual

Gets the current geolocation.

Implements webdriver::ViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::GetMute ( const ElementId element,
bool *  ,
Error **   
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetPlaybackSpeed ( const ElementId element,
double *  ,
Error **   
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetPlayerState ( const ElementId element,
PlayerState ,
Error **   
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetPlayerVolume ( const ElementId element,
double *  ,
Error **   
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetPlayingPosition ( const ElementId element,
double *  ,
Error **   
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetSource ( std::string *  source,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetStorageItem ( StorageType  type,
const std::string &  key,
std::string *  value,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetStorageKeys ( StorageType  type,
base::ListValue **  keys,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetStorageSize ( StorageType  type,
int *  size,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::GetTitle ( std::string *  title,
Error **  error 
)
virtual

Reimplemented from webdriver::QViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::GetURL ( std::string *  url,
Error **  error 
)
virtual
QWebView* webdriver::QWebViewCmdExecutor::getView ( const ViewId viewId,
Error **  error 
)
protected
virtual void webdriver::QWebViewCmdExecutor::GetWindowName ( std::string *  name,
Error **  error 
)
virtual

Reimplemented from webdriver::QViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::GoBack ( Error **  error)
virtual
virtual void webdriver::QWebViewCmdExecutor::GoForward ( Error **  error)
virtual
virtual void webdriver::QWebViewCmdExecutor::IsElementDisplayed ( const ElementId element,
bool  ignore_opacity,
bool *  is_displayed,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::IsElementEnabled ( const ElementId element,
bool *  is_enabled,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::IsOnline ( bool *  ,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::IsOptionElementSelected ( const ElementId element,
bool *  is_selected,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::MouseButtonDown ( Error **  error)
virtual
virtual void webdriver::QWebViewCmdExecutor::MouseButtonUp ( Error **  error)
virtual
virtual void webdriver::QWebViewCmdExecutor::MouseClick ( MouseButton  button,
Error **  error 
)
virtual
virtual void webdriver::QWebViewCmdExecutor::MouseDoubleClick ( Error **  error)
virtual
virtual void webdriver::QWebViewCmdExecutor::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::QWebViewCmdExecutor::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::QWebViewCmdExecutor::MouseMove ( const ElementId element,
Error **  error 
)
virtual

the mouse will be moved to the center of the element

Implements webdriver::ViewCmdExecutor.

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

Overrides the current geolocation.

Implements webdriver::ViewCmdExecutor.

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

set view as current

Reimplemented from webdriver::QViewCmdExecutor.

virtual void webdriver::QWebViewCmdExecutor::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::QWebViewCmdExecutor::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::QWebViewCmdExecutor::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::QWebViewCmdExecutor::SwitchToTopFrame ( Error **  error)
virtual

Switches the target frame to the topmost frame.

Implements webdriver::ViewCmdExecutor.

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

Touch commands emulation.

Implements webdriver::ViewCmdExecutor.

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

Friends And Related Function Documentation

friend class QWebViewVisualizerShowPointCommand
friend
friend class QWebViewVisualizerSourceCommand
friend

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