Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebDriverIO: Get started quickly [2019]
//Dynamic URLs
//If we wanted to update out urls on the fly through command line
//now we can pass in SERVER=prod in our command line and it will pick the appropriate URL
var baseAppUrl = "https://webdriver.io"
if(process.env.SERVER === "prod")
{
baseAppUrl = "https://ultimateqa.com/automation"
}
//Set the baseUrl property in the wdio.conf.js so that it reads from //your baseAppUrl variable
exports.config = {
baseUrl: baseAppUrl
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment