I am interested in setting up a configuration file to store all input data for my tests. I want the test to read this data from the file while it is being executed. For instance, I would like to specify browser name, search parameter, and server address in the file below.
Here is my sample test:
var driver = require("selenium-webdriver");
driver = new webdriver.Builder().
usingServer(server.address()).
withCapabilities({'browserName': 'chrome'}).
build();
it('should append query to title', function() {
driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click();
driver.wait(function() {
return driver.getTitle().then(function(title) {
return 'webdriver - Google Search' === title;
});
}, 1000);
});