capybara.werkzeug package

Submodules

capybara.werkzeug.browser module

class capybara.werkzeug.browser.Browser(driver)[source]

Bases: object

app
client[source]
current_url
dom
follow(method, path, params=None)[source]
html
refresh()[source]
submit(method, path, params)[source]
visit(path)[source]

capybara.werkzeug.driver module

class capybara.werkzeug.driver.Driver(app)[source]

Bases: capybara.driver.base.Base

browser
current_url

str – The current URL.

follow(method, path, params=None)[source]
html

str – A snapshot of the DOM of the current document, as it looks right now.

redirect_limit = 5
refresh()[source]

Refresh the page.

reset()[source]

Resets the driver.

submit(method, path, params)[source]
title

str – The current page title.

visit(path)[source]

Visits the given path.

Parameters:path (str) – The path to visit.

capybara.werkzeug.form module

class capybara.werkzeug.form.Form(driver, native)[source]

Bases: capybara.werkzeug.node.Node

params(button)[source]
submit(button)[source]

capybara.werkzeug.node module

class capybara.werkzeug.node.Node(driver, native)[source]

Bases: capybara.driver.node.Node

all_text

str – All of the text of the node.

checked

bool – Whether this node is checked.

click(*keys, **offset)[source]

Clicks on this node.

disabled

bool – Whether this node is disabled.

multiple

bool – Whether this is a multi-select node.

path

str – An XPath expression describing where on the page the node can be found.

readonly

bool – Whether the node is read-only.

select_option()[source]

Selects this option node.

selected

bool – Whether this node is selected.

set(value)[source]

Sets the value of this node.

Parameters:
  • value (bool | str) – The desired value.
  • **options – Driver-specific options for how to set a value on a node.
tag_name

str – The tag name of the node.

unnormalized_text(check_ancestor_visibility=True)[source]
unselect_option()[source]

Deselects this option node.

value

str – The value of the node.

visible

bool – Whether or not the node is visible.

visible_text

str – Only the visible text of the node.

Module contents