I am currently designing a protractor script that will allow me to connect to any website in order to perform daily tests to see if our platform works properly.
For that, we used BrowserStack which will allow us to make E2E tests and also check if our platform is compatible on all our formats (possibly see if there are bugs).
Being a beginner on this technology, I am currently experiencing a bug, which has been bothering me since this morning. My script generates a lot of errors and it doesn't work on some platforms.
I will let you see in detail what I have been able to develop at the moment. Nothing complicated indeed.
File test.conf.js:
exports.config = {
'specs': [ 'lavan/single.js' ],
'seleniumAddress': 'http://hub-cloud.browserstack.com/wd/hub',
'commonCapabilities': {
'browserstack.user': process.env.BROWSERSTACK_USERNAME || 'BROWSERSTACK_USERNAME',
'browserstack.key': process.env.BROWSERSTACK_ACCESS_KEY || 'BROWSERSTACK_ACCESS_KEY',
'build': 'SmartscreeningIO',
'name': 'Connexion',
'browserstack.local': true,
'browserstack.debug': 'true'
},
'multiCapabilities': [
{
'browserName': 'Chrome'
},
{
'browserName' : 'Firefox',
'browser_version' : '60.0 beta',
'os' : 'Windows',
'os_version' : '10',
'resolution' : '2048x1536',
},
{
'browserName' : 'Safari',
'browser_version' : '11.0',
'os' : 'OS X',
'os_version' : 'High Sierra',
'resolution' : '1920x1080',
},
{
'browserName' : 'iPhone',
'device' : 'iPhone 8',
'realMobile' : 'true',
'os_version' : '11.0',
},
{
'browserName' : 'android',
'device' : 'Samsung Galaxy S8',
'realMobile' : 'true',
'os_version' : '7.0',
}
],
};
// Code to support common capabilities
exports.config.multiCapabilities.forEach(function(caps){
for(var i in exports.config.commonCapabilities) caps[i] = caps[i] || exports.config.commonCapabilities[i];
});
File test.js
describe('Smartscreening connexion', function() {
it('can click to button after fill textfields', function(done) {
browser.driver.get('http://smartscreening.io/#/login/company').then(function() {
element(by.name('mail')).sendKeys(mail);
element(by.name('pwd')).sendKeys(pwd);
element(by.buttonText('Continuer')).click();
});
});
});
Could you help me clear up my worries... Thank you very much