Reputation: 105
On running the command 'Protractor conf.js' i get an error failed to load configuration file. I am unable to rectify it. Below is the configuration file and the test case file code.
conf.js:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
framework: 'jasmine2',
specs: ['todo-spec.js'],
onPrepare: function() {
browser.get('http://tmpcmamva07:8888/');
browser.driver.manage().window().maximize();
jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000;
element(by.model('username')).sendKeys('nagabhup');
element(by.model('password')).sendKeys('welcomE@123');
element(by.buttonText('Login')).click();
browser.sleep(2000);
browser.waitForAngular();
}
};
todo-spec.js
describe('LockTest', function() {
it('LockTheScenarioTest', function() {
var reportsTest = element(by.repeater('row in BaseCollection').row(0));
reportsTest.element(by.id('22090')).click();
reportsTest.element(by.id('22090')).element(by.xpath('following-sibling::ul')).click();
browser.sleep(4000);
browser.waitForAngular();
element(by.buttonText('Ok')).click();
expect(element(by.binding('signInName')).getText()).
toEqual('Pratham Nagabhushan');
});
});
I am not sure because of what it is unable to work. Please suggest ideas of the possible issue.
Upvotes: 1
Views: 3648
Reputation: 473833
When I copy-paste your config into WebStorm, it is complaining about an extra character after the browser.driver.manage().window().maximize();
line:
Remove it and you should be good to go.
Upvotes: 1