Skip to main content

Python Webpage Object Type Definitions

Runavelo adds the following types to the Python environment. You can use them without importing a module.

ElementDescriptor

class ElementDescriptor:
def __init__(self, uid, name):
"""
Identifies an element used by commands such as click and input.
:param uid: UID generated when the element is captured
:param name: Element name shown when the element cannot be found
"""
self._uid = uid
self._name = name

@property
def name(self) -> str:
return self._name

@property
def uid(self) -> str:
return self._uid


WebPage

class WebPage:

@property
def envId(self):
"""
Environment ID of the browser window that contains the current webpage
:return: str
"""
pass

@property
def browser(self):
"""
Name of the browser that contains the current webpage
:return: str
"""
pass

@property
def tabId(self):
pass

@property
def url(self):
"""
URL of the current webpage
:return: str
"""
pass

@property
def title(self):
"""
Title of the current webpage
:return: str
"""
pass

@property
def innerText(self) -> str:
"""
Text of the current webpage
:return: str
"""
pass

@property
def sourceCode(self) -> str:
"""
Source code of the current webpage
:return: str
"""
pass

@property
def left(self):
"""
Distance from the webpage's left edge to the screen's left edge
:return: int
"""
pass

@property
def top(self):
"""
Distance from the webpage's top edge to the screen's top edge
:return: int
"""
pass

@property
def right(self):
"""
Distance from the webpage's right edge to the screen's left edge
:return: int
"""
pass

@property
def bottom(self):
"""
Distance from the webpage's bottom edge to the screen's top edge
:return: int
"""
pass

@property
def width(self):
"""
Width of the current webpage
:return: int
"""
pass

@property
def height(self):
"""
Height of the current webpage
:return: int
"""
pass

WebElement

class WebElement:

@property
def innerText(self):
"""
innerText of the current web element
:return: str
"""
pass

@property
def outerHTML(self):
"""
outerHTML of the current web element
:return: str
"""
pass

@property
def left(self):
"""
Distance from the element's left edge to the screen's left edge
:return: int
"""
pass

@property
def top(self):
"""
Distance from the element's top edge to the screen's top edge
:return: int
"""
pass

@property
def right(self):
"""
Distance from the element's right edge to the screen's left edge
:return: int
"""
pass

@property
def bottom(self):
"""
Distance from the element's bottom edge to the screen's bottom edge
:return: int
"""
pass

@property
def width(self):
"""
Width of the current web element
:return: int
"""
pass

@property
def height(self):
"""
Height of the current web element
:return: int
"""
pass

@property
def x_center(self):
"""
Horizontal coordinate of the element's center relative to the screen's left edge
:return: int
"""
pass

@property
def y_center(self):
"""
Vertical coordinate of the element's center relative to the screen's top edge
:return: int
"""
pass

@property
def x_random(self):
"""
Horizontal coordinate of a random point inside the element
:return: int
"""
pass

@property
def y_random(self):
"""
Vertical coordinate of a random point inside the element
:return: int
"""
pass

@property
def index(self):
"""
Index of the current web element within its parent
:return: int
"""
pass

@property
def tagName(self):
"""
Tag name of the current web element
:return: str
"""
pass

@property
def parent(self):
"""
Parent of the current web element
:return: WebElement
"""
pass

@property
def children(self) -> list:
"""
All direct children of the current web element
:return: list[WebElement]
"""
pass

@property
def siblings(self):
"""
Siblings of the current web element
:return: list[WebElement]
"""
pass

@property
def pre_sibling(self):
"""
Previous sibling of the current web element
:return: WebElement
"""
pass

@property
def next_sibling(self):
"""
Next sibling of the current web element
:return: WebElement
"""
pass

@property
def attributes(self) -> WebElementDynamicAttributes:
"""
Attributes of the current web element
:return: WebElementDynamicAttributes
"""
pass

@property
def properties(self) -> WebElementDynamicProps:
"""
Properties of the current web element
:return: WebElementDynamicProps
"""
pass

@property
def value(self):
"""
JavaScript `value` property of the current web element
"""
pass

@property
def checked(self):
"""
JavaScript `checked` property of the current web element
"""
pass

@property
def selected(self):
"""
JavaScript `selected` property of the current web element
"""
pass

@property
def textContent(self):
"""
JavaScript `textContent` property of the current web element
"""
pass

@property
def href(self):
"""
JavaScript `href` property of the current web element
"""
pass

@property
def src(self):
"""
JavaScript `src` property of the current web element
"""
pass

@property
def innerHTML(self):
"""
JavaScript `innerHTML` property of the current web element
"""
pass

@property
def sourceCode(self):
"""
Source code of the current web element
"""
pass

WebElementDynamicAttributes

class WebElementDynamicAttributes(dict):
"""
This mapping reports a length of 0 and cannot be iterated. Read or write HTML attributes with bracket or dot notation.
"""
pass

WebElementDynamicProps

class WebElementDynamicProps(dict):
"""
This mapping reports a length of 0 and cannot be iterated. Read or write JavaScript HTMLElement properties with bracket or dot notation.
"""
pass