角度量角器:当使用某个特定名称时,没有发现任何规格错误

时间:2016-12-09 07:39:49

标签: angularjs automation protractor

我检查了之前发布的这个问题的答案,但面临非常奇怪的问题。

我正在运行的Proctractor脚本在脚本的名称时完全正常,如果有其他任何其他内容" TS001_SR001"。一旦它改为其他名称,它就会开始工作。

对此的任何帮助将不胜感激。

下面的scrtipt片段。下面以粗体突出显示的名称需要更改才能使其正常工作。

很奇怪的问题??? :-(

'use strict';
var Application = require('../../Utility/savingsFunctions.js');
describe('**TS001_SR001**', function() {
    var application = new Application('TS001_SR001');

    it('TS001_SR001#should Launch URL',function() {
        application.launchURL();
    });

    it('TS001_SR001#Login to the Fidea', function() {
        application.loginApplication();
    });

    it ('TS001_SR001#Click on Savings Lob', function(){
        application.navLandingPage_Tarrif();
    });

    it ('TS001_SR001#Fill Basic Info', function(){
        application.fillBasicInfo();

    });

    it ('TS001_SR001_Test#Open Policy Insured', function(){
        application.tarrifOpenPolicyHolder();
    });

    it ('TS001_SR001_Test#Open Policy Insured min details', function(){
        application.policyHolderInfoMin();
    });

    it ('TS001_SR001_Test#Click on Ok button insured page', function(){
        application.tarrifPolicyHolderOKbutton();
    });

    it ('TS001_SR001#Insured same as owner', function(){
        application.insuredSameAsOwner();
    });

    it ('TS001_SR001# Target Premiums', function(){
        application.targetPremiums();
    });

    it ('TS001_SR001# Regular Payments', function(){
        application.regularPayments();
    });

    it ('TS001_SR001#Initial Payment', function(){
        application.initialPayment();
    });

    it ('TS001_SR001#Next Button: Quote -> Coverage', function(){
        application.nextButtonQuote();
    });

    it ('TS001_SR001#Synthesis Selection', function(){
        application.synthesisSelection();
    });

    it ('TS001_SR001#Savings Selection', function(){
        application.SavingsSelection();
    });

    // it ('TS001_SR001#Death Benefits Selection', function(){
    //            element.all(by.name('membership:smoker')).get(1).click();
    // });

    it ('TS001_SR001#Add death Benefits', function(){
        application.Simulation_Death_Benefits();
    });

    it ('TS001_SR001#Next Button: Coverage -> Contract Info', function(){
        application.nextButtonCoverage();
    });

    it ('TS001_SR001#Add Representative Button', function(){
        application.addRepresentativeButton();
    });

    it ('TS001_SR001#Representative Info Fill', function(){
        application.otherPartyInfoMax('Representative');
    });

    it ('TS001_SR001#Representative OK Button', function(){
        application.okButtonOtherParties();

    }); 

    it ('TS001_SR001#Payment Mode', function(){
        application.addBillingDetails();
    });

    it ('TS001_SR001#Edit AML Questions', function(){
        application.editAMLQuestion();
    });

    it ('TS001_SR001#Fill AML Questions', function(){
        application.fillAMLQuestions();
    });

    it ('TS001_SR001#Click ok AML Questions', function(){
        application.okButtonAMLQuestion();
    });

    it ('TS001_SR001#Send to Fidea', function(){
        application.sendToFideaButton();
    });

    it ('TS001_SR001#Logout', function(){
        application.logout();
    });

});

Config.js

'use strict';
var jasminePtorFailfast = require('./Utility/jasminePtorFailfast');
var htmlReporter = require('./Utility/htmlReporter');
var fs = require('fs');
exports.config = {
     /*seleniumAddress: 'http://20.198.238.109:4444/wd/hub',
     seleniumPort: 4444,*/
  suites:
  { 
    //RegressionTest: ['Scripts/NewBusiness/*.js'],
    CustomTest :[
    'Scripts/NewBusiness/TS001_SR001.js'
    ]   
  },
    capabilities: {
    browserName: 'chrome',
    //<--Starts here --use for multiple instances-->
    shardTestFiles: true,
    maxInstances: 5

   },
   jasmineNodeOpts: {defaultTimeoutInterval: 3000000},
   allScriptsTimeout: 400000,
   getPageTimeout: 50000,
   onComplete: function(){
       //console.log('oncomplete');
   },
   onCleanUp: function() {
       //console.log('onCleanUp');
   },
   beforeLaunch: function() {
       console.log('beforeLaunch');
       // check if folders exists or not, if not create them
       var functionalReportsFolder = 'functionalReports';
       var reportsFolder = 'functionalReports/Reports';
       var reportsScreenshotsFolder = 'functionalReports/reports_screenshots';
       var InvestmentPerf = 'tests/functional/Perf/Investment';
       var SavingsPerf = 'tests/functional/Perf/Savings';
       var perfFile = 'tests/functional/Perf';

       if(!fs.existsSync(perfFile)){
            fs.mkdirSync(perfFile);
            console.log('perfFile created');
       };

       if(!fs.existsSync(functionalReportsFolder)){
            fs.mkdirSync(functionalReportsFolder);
            console.log('functionalReportsFolder created');
       };
       if(!fs.existsSync(reportsFolder)){
            fs.mkdirSync(reportsFolder);
            console.log('reportsFolder created');
       };
       if(!fs.existsSync(reportsScreenshotsFolder)){
            fs.mkdirSync(reportsScreenshotsFolder);
            console.log('reportsScreenshotsFolder created');
       };
       if(!fs.existsSync(InvestmentPerf)){
            fs.mkdirSync(InvestmentPerf);
            console.log('InvestmentPerf created');
       };
       if(!fs.existsSync(SavingsPerf)){
            fs.mkdirSync(SavingsPerf);
            console.log('SavingsPerf created');
       };

   },
   afterLaunch: function() {
        console.log('afterLaunch');
        var htmlreporter = new htmlReporter();
        htmlreporter.readDatafromFile();
        console.log('onto htmlreporter.createHTML(function()');
        htmlreporter.createHTML();
        console.log('onto htmlreporter.writeFile();');
        htmlreporter.writeFile();   
        console.log('completed htmlreporter.writeFile();');
        htmlreporter.deleteFiles();
   },
   onPrepare: function() {
    browser.manage().timeouts().pageLoadTimeout(50000);
    browser.manage().deleteAllCookies();
    browser.manage().timeouts().implicitlyWait(25000);
    browser.getCapabilities().then(function (cap) {
      browser.browserName = cap.browserName;
    });
    jasmine.getEnv().addReporter(new jasminePtorFailfast().launch());
    var disableNgAnimate = function() {
        angular.module('disableNgAnimate', []).run(function($animate) {
            $animate.enabled(false);
        });
    };
    var disableCssAnimate = function() {
        angular.module('disableCssAnimate', []).run(function() {
            var style = document.createElement('style');
            style.type = 'text/css';
            style.innerHTML = '* {' +
                '-webkit-transition: none !important;' +
                '-moz-transition: none !important' +
                '-o-transition: none !important' +
                '-ms-transition: none !important' +
                'transition: none !important' +
                '}';
            document.getElementsByTagName('head')[0].appendChild(style);
        });
    };
    browser.addMockModule('disableCssAnimate', disableCssAnimate);
    browser.addMockModule('disableNgAnimate', disableNgAnimate);
  },
  params:
    {
        wait : 50000,
        waitTime : 3000,
        env:'UAT',
        Url:'http://localhost:8080/#/fidea/'
    }

};

0 个答案:

没有答案