Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Protractor 5.1.1 + IE11, test cases fail randomly #4143

Closed
aozolin opened this issue Mar 9, 2017 · 3 comments
Closed

Protractor 5.1.1 + IE11, test cases fail randomly #4143

aozolin opened this issue Mar 9, 2017 · 3 comments

Comments

@aozolin
Copy link

aozolin commented Mar 9, 2017

Hi,

I have a bunch of test cases to run against IE11. With protractor 4.0.14 + selenium server 2.53.1 it works fine. But with the latest protractor 5.1.1 + selenium server 3.3.0 it doesn't. Some runs passed success, but some doesn't. It fails unexpected with random timeout errors.

Please investigate and fix the issue.

  • Node Version: v6.9.1
  • Protractor Version: 5.1.1
  • Angular Version: 2.4.7
  • Browser(s): IE11 (11.0.9600.18538)
  • Operating System and Version Windows 8.1
require('ts-node/register');
var helpers = require('./webpack/helpers');
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
var XMLReporter = require('ruru-protractor-junit-reporter');

exports.config = {
  seleniumServerJar: 'node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.3.0.jar',
  localSeleniumStandaloneOpts: {
      jvmArgs: ['-Dwebdriver.ie.driver=node_modules/protractor/node_modules/webdriver-manager/selenium/IEDriverServer_Win32_3.3.0.exe']
  },

  resultJsonOutputFile: 'my-protractor-e2e-results.json',
  exclude: [],

  suites: {
    mySuite: [
      helpers.root('test/e2e/**/client-server/my.test.e2e.ts')
    ]
  },

  framework: 'jasmine2',

  allScriptsTimeout: 110000,
  getPageTimeout: 110000,

  plugins: [{
    path: 'node_modules/protractor-istanbul-plugin'
  }],
  jasmineNodeOpts: {
    showTiming: true,
    showColors: true,
    isVerbose: false,
    includeStackTrace: false,
    defaultTimeoutInterval: 600000
  },
  directConnect: false,

  multiCapabilities: [
    {
      'browserName': 'internet explorer',
      'platform': 'ANY',
      'version': '11',
      'nativeEvents': false,
      'unexpectedAlertBehaviour': 'accept',
      'ignoreProtectedModeSettings': true,
      'enablePersistentHover': true,
      'disable-popup-blocking': true,
      'ignoreZoomSetting': true,
      shardTestFiles: true,
      maxInstances: 3
    }
  ],

  params: {
    url: '/test-app/'
  },

  onPrepare: function () {
    var protractorMatchers = require('jasmine-protractor-matchers');
    var jasmineExpect = require('jasmine-expect');
    var LoginPage = require('../test/e2e/page-objects/login.page');
    var AllureReporter = require('jasmine-allure-reporter');

    browser.driver.manage().window().maximize();

    jasmine.getEnv().addReporter(
      new Jasmine2HtmlReporter({
        takeScreenShotsOnlyForFailedSpecs: true,
        savePath: 'reports/'
      })
    );

    jasmine.getEnv().addReporter(new AllureReporter({
      resultsDir: 'reports/allure-results'
    }));

    var loginPage = new LoginPage();

    loginPage.login('protractor', 'protractor');
  },
  //Generate JUnit report
  afterLaunch: function (exitCode) {
    return new Promise(function (resolve) {

      var reporter = new XMLReporter({
        title: 'Fusion5-Core',
        xmlReportDestPath: 'reports/protractor-junit-report.xml'
      });

      reporter.generateXMLReport(exports.config.resultJsonOutputFile);
    });
  },
  useAllAngular2AppRoots: true
};

The stacktrace is:
[10:01:07] I/testLogger - [internet explorer 11 ANY #1-1] PID: 54295
[internet explorer 11 ANY #1-1] Specs: (/SVN/MyProject/test/e2e/test-tool/client-server/four.filter.string.field.e2e.ts
[internet explorer 11 ANY #1-1]
[internet explorer 11 ANY #1-1] [10:00:56] I/hosted - Using the selenium server at http://ie11.dev:4444/wd/hub
[internet explorer 11 ANY #1-1] Started
[internet explorer 11 ANY #1-1] problem trying to remove a folder:reports/
[internet explorer 11 ANY #1-1]
[internet explorer 11 ANY #1-1] (/SVN/MyProject/node_modules/selenium-webdriver/lib/error.js:27
[internet explorer 11 ANY #1-1] super(opt_error);
[internet explorer 11 ANY #1-1] ^
[internet explorer 11 ANY #1-1] JavascriptError: JavaScript error (WARNING: The server did not provide any stacktrace information)
[internet explorer 11 ANY #1-1] Command duration or timeout: 312 milliseconds
[internet explorer 11 ANY #1-1] Build info: version: '3.3.0', revision: 'b526bd5', time: '2017-03-07 11:21:31 -0800'
[internet explorer 11 ANY #1-1] System info: host: 'IE11WIN8_1', ip: '172.16.204.134', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_12
1'
[internet explorer 11 ANY #1-1] Driver info: org.openqa.selenium.ie.InternetExplorerDriver
[internet explorer 11 ANY #1-1] Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=false, ie.forceCreateProcessApi=false, ie.
forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=true, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=false, ie.ensureC
leanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:30
08/, javascriptEnabled=true, ignoreProtectedModeSettings=true, enableElementCacheCleanup=true, unexpectedAlertBehaviour=accept}]
[internet explorer 11 ANY #1-1] Session ID: 1a341ccc-4a60-4bec-bdc6-152c07e77a07
[internet explorer 11 ANY #1-1] at WebDriverError (/SVN/MyProject/node_modules/selenium-webdriver/lib/error.js:27:5)
[internet explorer 11 ANY #1-1] at JavascriptError (/SVN/MyProject/node_modules/selenium-webdriver/lib/error.js:133:5)
[internet explorer 11 ANY #1-1] at Object.checkLegacyResponse (/SVN/MyProject/node_modules/selenium-webdriver/lib/error.js:505:15)
[internet explorer 11 ANY #1-1] at parseHttpResponse (/SVN/MyProject/node_modules/selenium-webdriver/lib/http.js:440:13)
[internet explorer 11 ANY #1-1] at process.tickCallback (internal/process/next_tick.js:103:7)
[internet explorer 11 ANY #1-1] From: Task: Protractor.get(http://localhost:8080/test-app/) - get url
[internet explorer 11 ANY #1-1] at WebDriver.schedule (/SVN/MyProject/node_modules/selenium-webdriver/lib/webdriver.js:816:17)
[internet explorer 11 ANY #1-1] at ProtractorBrowser.executeScriptWithDescription (/SVN/MyProject/node_modules/protractor/lib/browser.ts:897:25)
[internet explorer 11 ANY #1-1] at (/SVN/MyProject/node_modules/selenium-webdriver/lib/webdriver.js:947:14
[internet explorer 11 ANY #1-1] at TaskQueue.execute
(/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:2970:14)
[internet explorer 11 ANY #1-1] at TaskQueue.executeNext_ (/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:2953:27)
[internet explorer 11 ANY #1-1] at asyncRun (/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:2860:25)
[internet explorer 11 ANY #1-1] at (/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:676:7
[internet explorer 11 ANY #1-1] From: Task:
[internet explorer 11 ANY #1-1] at Timeout.pollCondition [as _onTimeout] (/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:2101:19)
[internet explorer 11 ANY #1-1] at ontimeout (timers.js:365:14)
[internet explorer 11 ANY #1-(/SVN/MyProject1] at tryOnTimeout (timers.js:237:5)
[internet explorer 11 ANY #1-1] at Timer.listOnTimeout (timers.js:207:5)
[internet explorer 11 ANY #1-1] From: Task: waiting for page to load for 110000ms
[internet explorer 11 ANY #1-1] at scheduleWait (/SVN/MyProject/node_modules/selenium-webdriver/lib/promise.js:2094:20)

@wyvern8
Copy link

wyvern8 commented Mar 14, 2017

I'm seeing similar results. Might try downgrade.

@aozolin
Copy link
Author

aozolin commented Mar 14, 2017

Yes, the downgrade to 4.0.14 works. But it's not a good solution as the features and fixes are not available in the case.

@cnishina
Copy link
Member

Internet Explorer in general has been flaky as noted in the previous issues opened. If this consistently happened on every browser, then it would definitely be a Protractor issue. Please file this against the internet explorer driver.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants