control
Break
¶
Bases: BodyItem
Represents BREAK
.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
Continue
¶
Bases: BodyItem
Represents CONTINUE
.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
Error
¶
Bases: BodyItem
Represents syntax error in data.
For example, an invalid setting like [Setpu]
or END
in wrong place.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
For
¶
Bases: BodyItem
Represents FOR
loops.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
variables: tuple[str, ...]
property
writable
¶
Deprecated since Robot Framework 7.0. Use :attr:assign
instead.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
ForIteration
¶
Bases: BodyItem
Represents one FOR loop iteration.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
variables: Mapping[str, str]
property
¶
Deprecated since Robot Framework 7.0. Use :attr:assign
instead.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
If
¶
Bases: BodyItem
IF/ELSE structure root. Branches are stored in :attr:body
.
Source code in src/robot/model/control.py
id: None
property
¶
Root IF/ELSE id is always None
.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
IfBranch
¶
Bases: BodyItem
Represents individual IF
, ELSE IF
or ELSE
branch.
Source code in src/robot/model/control.py
id: str
property
¶
Branch id omits IF/ELSE root from the parent id part.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
Return
¶
Bases: BodyItem
Represents RETURN
.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
Try
¶
Bases: BodyItem
TRY/EXCEPT structure root. Branches are stored in :attr:body
.
Source code in src/robot/model/control.py
id: None
property
¶
Root TRY/EXCEPT id is always None
.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
TryBranch
¶
Bases: BodyItem
Represents individual TRY
, EXCEPT
, ELSE
or FINALLY
branch.
Source code in src/robot/model/control.py
id: str
property
¶
Branch id omits TRY/EXCEPT root from the parent id part.
variable: str | None
property
writable
¶
Deprecated since Robot Framework 7.0. Use :attr:assign
instead.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
Var
¶
Bases: BodyItem
Represents VAR
.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
While
¶
Bases: BodyItem
Represents WHILE
loops.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html
Source code in src/robot/model/modelobject.py
WhileIteration
¶
Bases: BodyItem
Represents one WHILE loop iteration.
Source code in src/robot/model/control.py
id: str | None
property
¶
Item id in format like s1-t3-k1
.
See :attr:TestSuite.id <robot.model.testsuite.TestSuite.id>
for
more information.
id
is None
only in these special cases:
- Keyword uses a placeholder for
setup
orteardown
when asetup
orteardown
is not actually used. - With :class:
~robot.model.control.If
and :class:~robot.model.control.Try
instances representing IF/TRY structure roots.
config(**attributes)
¶
Configure model object with given attributes.
obj.config(name='Example', doc='Something')
is equivalent to setting
obj.name = 'Example'
and obj.doc = 'Something'
.
New in Robot Framework 4.0.
Source code in src/robot/model/modelobject.py
copy(**attributes)
¶
Return a shallow copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.copy(name='New name')
.
See also :meth:deepcopy
. The difference between copy
and
deepcopy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
deepcopy(**attributes)
¶
Return a deep copy of this object.
:param attributes: Attributes to be set to the returned copy.
For example, obj.deepcopy(name='New name')
.
See also :meth:copy
. The difference between deepcopy
and
copy
is the same as with the methods having same names in
the copy__ module.
__ https://docs.python.org/3/library/copy.html
Source code in src/robot/model/modelobject.py
from_dict(data)
classmethod
¶
Create this object based on data in a dictionary.
Data can be got from the :meth:to_dict
method or created externally.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
from_json(source)
classmethod
¶
Create this object based on JSON data.
The data is given as the source
parameter. It can be:
- a string (or bytes) containing the data directly,
- an open file object where to read the data from, or
- a path (
pathlib.Path
or string) to a UTF-8 encoded file to read.
The JSON data is first converted to a Python dictionary and the object
created using the :meth:from_dict
method.
Notice that the source
is considered to be JSON data if it is
a string and contains {
. If you need to use {
in a file system
path, pass it in as a pathlib.Path
instance.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
Source code in src/robot/model/modelobject.py
to_json(file=None, *, ensure_ascii=False, indent=0, separators=(',', ':'))
¶
Serialize this object into JSON.
The object is first converted to a Python dictionary using the
:meth:to_dict
method and then the dictionary is converted to JSON.
The file
parameter controls what to do with the resulting JSON data.
It can be:
None
(default) to return the data as a string,- an open file object where to write the data to, or
- a path (
pathlib.Path
or string) to a file where to write the data using UTF-8 encoding.
JSON formatting can be configured using optional parameters that
are passed directly to the underlying json__ module. Notice that
the defaults differ from what json
uses.
With robot.running
model objects new in Robot Framework 6.1,
with robot.result
new in Robot Framework 7.0.
__ https://docs.python.org/3/library/json.html