Hope someone can help me with this as I searched for several days without success
I'm currently trying to use Protractor to test the AngularJS e2e application
I have a Protractor installation and a test run, however, when I have several tests / specifications, the first test runs, and then errors are displayed with the following command on the command line:
Jasmine timeout. Reset WebDriver control flow. Last active task: unknown
My config.js is as follows:
// conf.js exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['spec.js','fileupload.js'], allScriptsTimeout: 20000, // Options to be passed to Jasmine-node. jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 100000, isVerbose: true } };
Here are my Jasmine tests
//spec.js
describe('Site login', function () { it('should login', function () { browser.driver.get('http://mysite.co.uk'); browser.driver.findElement(by.name('UserName')).sendKeys('user'); browser.driver.findElement(by.name('Password')).sendKeys('xpassword'); browser.driver.findElement(by.id('logIn')).click(); expect(browser.driver.findElement(by.id('topUsername')).getText()).toContain('user'); browser.close(); }); });
// file upload specification
describe('File Upload', function() { it('should upload a file', function () { browser.driver.get('http://mysite.co.uk'); browser.driver.findElement(by.name('UserName')).sendKeys('user'); browser.driver.findElement(by.name('Password')).sendKeys('xpassword'); browser.driver.findElement(by.id('logIn')).click(); browser.driver.findElement(by.id('upload')).click(); browser.driver.findElement(by.name('FileToUpload')).sendKeys("C:\\myfile.csv"); browser.driver.findElement(by.xpath('html/body/div[1]/div[7]/div[2]/div/button[2]/span')).click(); console.log('file has been uploaded'); }); });
Any help would be greatly appreciated.
PS I apologize if I formatted something wrong, the first poster :)
Edit : Problem resolved by updating to Protractor v1.0.0 through npm update
Thank you all for your help :)