> For the complete documentation index, see [llms.txt](https://docs.oxygenhq.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oxygenhq.org/advanced/environments.md).

# Environments

Similarly to page objects, environments can be set up to properly organize your desired environments. They may include different URLs and different users for each environment. They will be stored in a special file called oxygen.env.js

#### setting up our environments:

```
module.exports = {

    TEST: {
        url: 'https://test.app.com',
        con_string: 'Driver={SQL Server};Server=DESKTOP\\SQLEXPRESS;Database=test;',
        username: 'testuser',
        password: 'test123'
    },

    PREP: {
        url: 'https://prep.app.com',
        con_string: 'Driver={SQL Server};Server=DESKTOP\\SQLEXPRESS;Database=prep;',
        username: 'prepuser',
        password: 'prep123'
    }
    
}
```

now that we've set them up, we can choose them by clicking on the settings icon on the top right

![](/files/-MVMfJUNyvjqLph-rDLY)

![](/files/-MVMfZVbCdOXAtBZGv_q)

let's choose the PREP environment and use it in our script:

```
web.init()
web.open(env.url) // https://prep.app.com

db.setConnectionString(env.con_string) 

web.type('id=username', env.username)
web.type('id=password', env.password)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.oxygenhq.org/advanced/environments.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.
