|
WD
|
#include <webdriver_session.h>

Public Member Functions | |
| Session () | |
| ~Session () | |
| Error * | Init (const base::DictionaryValue *desired_capabilities_dict, const base::DictionaryValue *required_capabilities_dict) |
| Error * | BeforeExecuteCommand () |
| Error * | AfterExecuteCommand () |
| void | Terminate () |
| base::ListValue * | GetLog () const |
| void | AddPerfLogEntry (LogLevel level, const std::string &message) |
| LogLevel | GetMinPerfLogLevel () const |
| base::ListValue * | GetPerfLog () const |
| void | RunSessionTask (const base::Closure &task) |
| const std::string & | id () const |
| const FramePath & | current_frame () const |
| void | set_current_frame (const FramePath &frame) |
| const ViewId & | current_view () const |
| void | set_current_view (const ViewId &viewId) |
| void | set_page_load_timeout (int timeout_ms) |
| int | page_load_timeout () const |
| void | set_async_script_timeout (int timeout_ms) |
| int | async_script_timeout () const |
| void | set_implicit_wait (int timeout_ms) |
| int | implicit_wait () const |
| const Point & | get_mouse_position () const |
| void | set_mouse_position (const Point &point) |
| int | get_sticky_modifiers () const |
| void | set_sticky_modifiers (int mods) |
| const DictionaryValue * | get_desired_caps () const |
| const DictionaryValue * | get_required_caps () const |
| const Logger & | logger () const |
| const FilePath & | temp_dir () const |
| const Capabilities & | capabilities () const |
| ViewHandle * | GetViewHandle (const ViewId &viewId) const |
| bool | AddNewView (ViewHandle *handle, ViewId *viewId) |
| bool | ReplaceViewHandle (const ViewId &viewId, ViewHandle *handle) |
| ViewId | GetViewForHandle (ViewHandle *handle) const |
| void | RemoveView (const ViewId &viewId) |
| void | UpdateViews (const std::set< ViewId > &views) |
| ElementHandle * | GetElementHandle (const ViewId &viewId, const ElementId &elementId) const |
| ElementId | GetElementIdForHandle (const ViewId &viewId, const ElementHandle *handle) const |
| bool | AddElement (const ViewId &viewId, ElementHandle *handle, ElementId *elementId) |
| void | RemoveElement (const ViewId &viewId, const ElementId &elementId) |
Public Attributes | |
| std::vector< ElementId > | frame_elements_ |
Every connection made by WebDriver maps to a session object. This object creates the browser instance and keeps track of the state necessary to control the browser created. A session manages its own lifetime.
| webdriver::Session::Session | ( | ) |
Adds this Session to the SessionManager. The session manages its own lifetime. Call Terminate, not delete, if you need to quit.
| webdriver::Session::~Session | ( | ) |
Removes this Session from the SessionManager.
| bool webdriver::Session::AddElement | ( | const ViewId & | viewId, |
| ElementHandle * | handle, | ||
| ElementId * | elementId | ||
| ) |
Add element mapping
| viewId | target view |
| handle | pointer to element handle, no need to delete |
| elementId | returned elementId |
| bool webdriver::Session::AddNewView | ( | ViewHandle * | handle, |
| ViewId * | viewId | ||
| ) |
Put ViewHandle in map and return new ViewId for this handle
| handle | handle to put, no need to delete. | |
| [out] | viewId | returned viewId |
| void webdriver::Session::AddPerfLogEntry | ( | LogLevel | level, |
| const std::string & | message | ||
| ) |
| Error* webdriver::Session::AfterExecuteCommand | ( | ) |
Should be called after executing a command.
| int webdriver::Session::async_script_timeout | ( | ) | const |
| Error* webdriver::Session::BeforeExecuteCommand | ( | ) |
Should be called before executing a command.
| const Capabilities& webdriver::Session::capabilities | ( | ) | const |
| const FramePath& webdriver::Session::current_frame | ( | ) | const |
| const ViewId& webdriver::Session::current_view | ( | ) | const |
|
inline |
| const Point& webdriver::Session::get_mouse_position | ( | ) | const |
|
inline |
|
inline |
| ElementHandle* webdriver::Session::GetElementHandle | ( | const ViewId & | viewId, |
| const ElementId & | elementId | ||
| ) | const |
Get elementHandle for given elementId in specific view
| viewId | requested view |
| elementId | requested element |
| ElementId webdriver::Session::GetElementIdForHandle | ( | const ViewId & | viewId, |
| const ElementHandle * | handle | ||
| ) | const |
Get elementId for given element handle in specific view
| viewId | requested view |
| handle | requested element handle |
| base::ListValue* webdriver::Session::GetLog | ( | ) | const |
Returns a copy of the current log entries. Caller is responsible for returned value.
| LogLevel webdriver::Session::GetMinPerfLogLevel | ( | ) | const |
Return current minimum LogLevel for Performance Logging, by default kOffLogLevel.
| base::ListValue* webdriver::Session::GetPerfLog | ( | ) | const |
Returns a copy of the current performance log entries.
| ViewId webdriver::Session::GetViewForHandle | ( | ViewHandle * | handle | ) | const |
Check if some view maps handle
| handle | to check |
| ViewHandle* webdriver::Session::GetViewHandle | ( | const ViewId & | viewId | ) | const |
Get ViewHandle for given ViewId
| viewId | requested viewId |
| const std::string& webdriver::Session::id | ( | ) | const |
Get session id
| int webdriver::Session::implicit_wait | ( | ) | const |
| Error* webdriver::Session::Init | ( | const base::DictionaryValue * | desired_capabilities_dict, |
| const base::DictionaryValue * | required_capabilities_dict | ||
| ) |
Initializes the session with the given capabilities.
| const Logger& webdriver::Session::logger | ( | ) | const |
| int webdriver::Session::page_load_timeout | ( | ) | const |
Invalidate elementId in specific view. Remove it from map
| viewId | requested view |
| elementId | element to invalidate |
| void webdriver::Session::RemoveView | ( | const ViewId & | viewId | ) |
Invalidate viewIdRemove it from map
| viewId | requested view |
| bool webdriver::Session::ReplaceViewHandle | ( | const ViewId & | viewId, |
| ViewHandle * | handle | ||
| ) |
Change mapping of viewId to handle
| viewId | viewId to change |
| handle | new handle to map |
| void webdriver::Session::RunSessionTask | ( | const base::Closure & | task | ) |
Runs task in session's context
| task | task to run |
| void webdriver::Session::set_async_script_timeout | ( | int | timeout_ms | ) |
| void webdriver::Session::set_current_frame | ( | const FramePath & | frame | ) |
| void webdriver::Session::set_current_view | ( | const ViewId & | viewId | ) |
| void webdriver::Session::set_implicit_wait | ( | int | timeout_ms | ) |
| void webdriver::Session::set_mouse_position | ( | const Point & | point | ) |
| void webdriver::Session::set_page_load_timeout | ( | int | timeout_ms | ) |
|
inline |
| const FilePath& webdriver::Session::temp_dir | ( | ) | const |
| void webdriver::Session::Terminate | ( | ) |
Terminates this session and deletes itself.
| void webdriver::Session::UpdateViews | ( | const std::set< ViewId > & | views | ) |
Invalidate all views except passed
| views | set of valid views |
| std::vector<ElementId> webdriver::Session::frame_elements_ |