Robot Framework SeleniumLibrary
SeleniumLibrary.base.context.ContextAware Class Reference
Inheritance diagram for SeleniumLibrary.base.context.ContextAware:
SeleniumLibrary.base.librarycomponent.LibraryComponent SeleniumLibrary.locators.customlocator.CustomLocator SeleniumLibrary.locators.elementfinder.ElementFinder SeleniumLibrary.locators.windowmanager.WindowManager SeleniumLibrary.keywords.alert.AlertKeywords SeleniumLibrary.keywords.browsermanagement.BrowserManagementKeywords SeleniumLibrary.keywords.cookie.CookieKeywords SeleniumLibrary.keywords.element.ElementKeywords SeleniumLibrary.keywords.formelement.FormElementKeywords SeleniumLibrary.keywords.frames.FrameKeywords SeleniumLibrary.keywords.javascript.JavaScriptKeywords SeleniumLibrary.keywords.runonfailure.RunOnFailureKeywords SeleniumLibrary.keywords.screenshot.ScreenshotKeywords SeleniumLibrary.keywords.selectelement.SelectElementKeywords SeleniumLibrary.keywords.tableelement.TableElementKeywords SeleniumLibrary.keywords.waiting.WaitingKeywords SeleniumLibrary.keywords.window.WindowKeywords

Public Member Functions

def __init__ (self, ctx)
 Base class exposing attributes from the common context. More...
 
def find_element (self, locator, tag=None, required=True, parent=None)
 Find element matching locator. More...
 
def find_elements (self, locator, tag=None, parent=None)
 Find all elements matching locator. More...
 
def is_element_enabled (self, locator, tag=None)
 
def is_text_present (self, text)
 
def is_visible (self, locator)
 

Public Attributes

 ctx
 

Properties

 driver = property
 
 drivers = property
 
 element_finder = property
 

Private Member Functions

def driver (self)
 
def drivers (self)
 
def element_finder (self)
 
def element_finder (self, value)
 

Detailed Description

Definition at line 20 of file context.py.

Constructor & Destructor Documentation

◆ __init__()

def SeleniumLibrary.base.context.ContextAware.__init__ (   self,
  ctx 
)

Base class exposing attributes from the common context.

    :param ctx: The library itself as a context object.
    :type ctx: SeleniumLibrary.SeleniumLibrary

Reimplemented in SeleniumLibrary.locators.windowmanager.WindowManager, SeleniumLibrary.locators.elementfinder.ElementFinder, SeleniumLibrary.keywords.window.WindowKeywords, and SeleniumLibrary.keywords.browsermanagement.BrowserManagementKeywords.

Definition at line 27 of file context.py.

Member Function Documentation

◆ driver()

def SeleniumLibrary.base.context.ContextAware.driver (   self)
private

Definition at line 33 of file context.py.

◆ drivers()

def SeleniumLibrary.base.context.ContextAware.drivers (   self)
private

Definition at line 39 of file context.py.

◆ element_finder() [1/2]

def SeleniumLibrary.base.context.ContextAware.element_finder (   self)
private

Definition at line 45 of file context.py.

◆ element_finder() [2/2]

def SeleniumLibrary.base.context.ContextAware.element_finder (   self,
  value 
)
private

Definition at line 50 of file context.py.

◆ find_element()

def SeleniumLibrary.base.context.ContextAware.find_element (   self,
  locator,
  tag = None,
  required = True,
  parent = None 
)

Find element matching locator.

    :param locator: Locator to use when searching the element.
        See library documentation for the supported locator syntax.
    :type locator: str or selenium.webdriver.remote.webelement.WebElement
    :param tag: Limit searching only to these elements.
    :type tag: str
    :param required: Raise `ElementNotFound` if element not found when
        true, return `None` otherwise.
    :type required: True or False
    :param parent: Optional parent `WebElememt` to search child elements
        from. By default search starts from the root using `WebDriver`.
    :type parent: selenium.webdriver.remote.webelement.WebElement
    :return: Found `WebElement` or `None` if element not found and
        `required` is false.
    :rtype: selenium.webdriver.remote.webelement.WebElement
    :raises SeleniumLibrary.errors.ElementNotFound: If element not found
        and `required` is true.

Definition at line 72 of file context.py.

◆ find_elements()

def SeleniumLibrary.base.context.ContextAware.find_elements (   self,
  locator,
  tag = None,
  parent = None 
)

Find all elements matching locator.

    :param locator: Locator to use when searching the element.
        See library documentation for the supported locator syntax.
    :type locator: str or selenium.webdriver.remote.webelement.WebElement
    :param tag: Limit searching only to these elements.
    :type tag: str
    :param parent: Optional parent `WebElememt` to search child elements
        from. By default search starts from the root using `WebDriver`.
    :type parent: selenium.webdriver.remote.webelement.WebElement
    :return: list of found `WebElement` or empty if elements are not found.
    :rtype: list[selenium.webdriver.remote.webelement.WebElement]

Definition at line 88 of file context.py.

◆ is_element_enabled()

def SeleniumLibrary.base.context.ContextAware.is_element_enabled (   self,
  locator,
  tag = None 
)

Definition at line 95 of file context.py.

◆ is_text_present()

def SeleniumLibrary.base.context.ContextAware.is_text_present (   self,
  text 
)

Definition at line 91 of file context.py.

◆ is_visible()

def SeleniumLibrary.base.context.ContextAware.is_visible (   self,
  locator 
)

Definition at line 100 of file context.py.

Member Data Documentation

◆ ctx

SeleniumLibrary.base.context.ContextAware.ctx

Definition at line 28 of file context.py.

Property Documentation

◆ driver

SeleniumLibrary.base.context.ContextAware.driver = property
static

Definition at line 31 of file context.py.

◆ drivers

SeleniumLibrary.base.context.ContextAware.drivers = property
static

Definition at line 37 of file context.py.

◆ element_finder

SeleniumLibrary.base.context.ContextAware.element_finder = property
static

Definition at line 43 of file context.py.


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