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

#include <webdriver_element_id.h>

Public Member Functions

 ElementId ()
 
 ElementId (const std::string &id)
 
 ElementId (const base::Value *value)
 
 ~ElementId ()
 
base::Value * ToValue () const
 
bool is_valid () const
 
const std::string & id () const
 

Detailed Description

This class represents a WebDriver Element ID. These IDs are mapped to objects in a page.

Constructor & Destructor Documentation

webdriver::ElementId::ElementId ( )

Creates an invalid ElementId.

webdriver::ElementId::ElementId ( const std::string &  id)
explicit

Creates a valid ElementId using the ID of an element. An empty string can be used to refer to the root document of the page.

Parameters
idelementId
webdriver::ElementId::ElementId ( const base::Value *  value)
explicit

Creates a ElementId from an element dictionary returned by a WebDriver atom. It will be valid if the dictionary is correctly constructed.

Parameters
valueelementId from parsed JSON
webdriver::ElementId::~ElementId ( )

Member Function Documentation

const std::string& webdriver::ElementId::id ( ) const
inline

Returns string form of id.

bool webdriver::ElementId::is_valid ( ) const

Returns whether this ID is valid. Even if the ID is valid, it may not refer to a valid ID on the page.

base::Value* webdriver::ElementId::ToValue ( ) const

Returns the appropriate Value type to be used to identify the element to a WebDriver atom. The client takes ownership.


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