Navigating the web with the Dendrite browser
goto
, which loads a page in the current or a new tab. Dendrite also has build in support for authenticating on websites. Additionally, Dendrite offers mechanisms to verify that the correct page has loaded and to wait for specific conditions before proceeding.
The key concepts and methods related to navigation are:
goto
for loading web pagesexpected_page
for page verificationwait_for
for synchronizing with page conditionsask
for querying the state of the pagegoto
method is used to navigate to a specified URL. It can open the URL in the active page or in a new tab.
The goto
method returns a Page object, representing the page.
expected_page
parameter allows you to describe the type of page that should be expected after navigation. Dendrite uses this description to verify that the correct page has loaded.
wait_for
and ask
.
new_page=True
. This creates a new Page
instance, allowing for interaction with multiple pages simultaneously.
Page
instance to ensure that actions are performed on the correct page. The Dendrite
instance maintains a list of all open pages through the pages
property.
pages
property returns a list of all active Page
instances managed by the Dendrite
browser.
Page
class rather than the Dendrite
class. This ensures that the interaction occurs on the intended page.
Example: Interacting with Multiple Pages
Page
instances.