# go

## Syntax

```python
py.go(direction: str) -> Pylenium
py.go(direction: str, number: int) -> Pylenium
```

## Usage

* Go forward one page

```python
py.go("forward")
```

* Go back two pages

```python
py.go("back", 2)
```

## Arguments

* <mark style="color:purple;">`direction (str)`</mark> - forward or back
* <mark style="color:purple;">`number=1 (int)`</mark> - go back or forward N pages in history

{% hint style="warning" %}
**`number`** must be a positive integer.
{% endhint %}

## Yields

* <mark style="color:orange;">**Pylenium**</mark>**&#x20;-** The current instance of Pylenium so you can chain commands.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pylenium.io/driver-commands/navigation/go.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
