the conf file is :
exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  
  specs: ['../../NG-Experience/uee/src/main/webapp/test/pc/**/pro.file.js'],
  
  capabilities: {
     'browserName': 'internet explorer',
     'platform': 'ANY',
  },
  
  baseUrl: 'http://localhost:8080',
  
  onPrepare: function(){
        require('jasmine-reporters');
        var capsPromise = browser.getCapabilities();
browser.driver.manage().window().maximize();
        capsPromise.then(function(caps){
            var browserName = caps.caps_.browserName.toUpperCase();
            var browserVersion = caps.caps_.version;
            var prePendStr = browserName + "-" + browserVersion + "-";
            jasmine.getEnv().addReporter(new
            jasmine.JUnitXmlReporter("protractor_output", true, 
true,"protractor-"+browserName,true));
        });
   },
}

test case is :
var filepath = "D:\\TestTools\\fileupload\\";
describe('file组件文件上传', function() {
it('001.单文件上传,file单独使用,并进行require校验', function() {       
browser.get('/uee/test/pc/file.business.html#/file');
browser.driver.manage().window().maximize();
$("#upload-single1").click();
expect($("#fileSingle1-file-value").getAttribute("ueevstatus")).toBe("fail");
expect($("#fileSingle1-file-value").getAttribute("ueevmsg")).toBe("必填项。"); 
$("#fileSingle1-file").sendKeys(filepath+"file01.gif");
        $("#upload-single1").click();
        expect($("#fileSingle1_name 
input").getAttribute("value")).toBe("file01.gif");
        expect($("#fileSingle1_tmpfile 
input").getAttribute("value")).not.toBe("");
        expect($("#fileSingle1_size 
input").getAttribute("value")).toBe("3836KB");
});  
});  

question:it work well in chrome and firefox ,  but it can't select file in 
it .  the sendKeys does't work.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to