I have protractor tests working with Selenium using IEDriverServer (32 bit). I have several problems with tags <select>that do not click and do not reveal their parameters.
Here is my conf.js:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
multiCapabilities: [
{
browserName: 'internet explorer',
ignoreProtectedModeSettings: true,
ignoreZoomSetting: true,
nativeEvents: false
}
],
baseUrl: String(process.env.COMPUTERNAME.toLowerCase()) === String('build') ? 'http://dev/' : 'http://' + process.env.COMPUTERNAME + '/',
suites: {
dashboard: 'dashboard/myCallbacksWidget_spec.js',
employees: 'employees/employees_spec.js',
lead: 'lead/lead_spec.js',
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 80000
},
allScriptsTimeout: 80000,
onPrepare: function () {
browser.driver.manage().window().maximize();
if (process.env.TEAMCITY_VERSION) {
require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
};
var ScreenShotReporter = require('protractor-html-screenshot-reporter');
var path = require('path');
jasmine.getEnv().addReporter(new ScreenShotReporter({
baseDirectory: 'tmp/report',
pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) {
return descriptions.join('-');
}
}));
}
};
Here is my test:
describe('Lead Details Test', function () {
var arrowDown = '\uE015';
it('should open the first lead', function () {
browser.get('Slate.Iva/#/search-leads');
var firstItem = element(by.repeater('row in renderedRows').row(0));
firstItem.evaluate('onDblClickRow(row)');
expect(element(by.id('leadName')).isPresent()).toBe(true);
});
it('should select reason for difficulty', function () {
var reasonForDifficulty = element(by.id('reasonForDifficultySelect'));
expect(reasonForDifficulty.isPresent()).toBe(true);
reasonForDifficulty.click().sendKeys(arrowDown).sendKeys(protractor.Key.ENTER);
var saveButton = element(by.id('saveLead'));
saveButton.click();
browser.refresh();
var firstOption = element.all(by.options('item.id as item.name for item in leadData.reasonForDifficultyTypes')).first();
expect(firstOption.getText()).toEqual('Cosmetic Surgery');
});
});
When I do reasonForDifficulty.click(), it highlights <select>, but sendKeys don't seem to work.
This code works if it <select>is a drop down list.
I am using Protractor 2.0.0, Selenium 2.45.0 and IEDriverServer 2.45.0.0. I also work on Windows 8.1 and have IE11.
Is there a workaround for this, or am I missing something in my code?