OXYGEN
Home
GitHub
Releases
Community
Search…
Welcome to Oxygen
About
What is Oxygen?
Getting Started (Videos)
Getting help
Download and work with Oxygen
Download & Installation
Start working with Oxygen
Oxygen Modules
Test Parameters
Cloud Providers
Sauce Labs
Lambda Test
TestObject
Advanced programming in Oxygen
Project Configuration
Locating Elements
Page Objects
Environments
Code Components
Powered By
GitBook
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
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)
​
​
​
Advanced programming in Oxygen - Previous
Page Objects
Next - Advanced programming in Oxygen
Code Components
Last modified
1yr ago
Copy link