package: qacode.core.webs.pages

Class: PageBase

package module qacode.core.webs.pages.page_base

class qacode.core.webs.pages.page_base.PageBase(bot, **kwargs)[source]

Bases: object

Base class for all Inehrit Page classes wich need selenium functionality througth qacode bot

bot = None
get_element(config_control)[source]

Search element on Bot instance

Arguments:
config_controls {dict} – base dict for ControlBase class
Returns:
ControlBase – an element to be use
throught selenium
get_elements(config_controls)[source]
Search element on Bot instance, choose selector
from instance or locator param
Arguments:
config_controls {dict} – base dict for ControlBase class
Returns:
list(ControlBase) – an element to be use as wrapper
for selenium functionality
go_url(url=None, wait_for_load=0)[source]

Go to url, choose url from instance or locator params

Keyword Arguments:
url {str} – string of FQDN, if None, load value from settings
(default: {self.settings.get(‘url’)})

wait_for_load {int} – [description] (default: {0})

is_url(url=None, ignore_raises=True)[source]
Allows to check if current selenium visible url it’s the same
what self.url value
Attributes:
url: default page url but can be string

value used to verify url

ignore_raises: not raise exceptions if enabled

log = None
settings = None
class qacode.core.webs.pages.page_base.PageBase(bot, **kwargs)[source]

Base class for all Inehrit Page classes wich need selenium functionality througth qacode bot

get_element(config_control)[source]

Search element on Bot instance

Arguments:
config_controls {dict} – base dict for ControlBase class
Returns:
ControlBase – an element to be use
throught selenium
get_elements(config_controls)[source]
Search element on Bot instance, choose selector
from instance or locator param
Arguments:
config_controls {dict} – base dict for ControlBase class
Returns:
list(ControlBase) – an element to be use as wrapper
for selenium functionality
go_url(url=None, wait_for_load=0)[source]

Go to url, choose url from instance or locator params

Keyword Arguments:
url {str} – string of FQDN, if None, load value from settings
(default: {self.settings.get(‘url’)})

wait_for_load {int} – [description] (default: {0})

is_url(url=None, ignore_raises=True)[source]
Allows to check if current selenium visible url it’s the same
what self.url value
Attributes:
url: default page url but can be string

value used to verify url

ignore_raises: not raise exceptions if enabled