protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Getting Async Error when running tests against IE.-

Open bmsoko opened this issue 11 years ago • 1 comments

Hello! I'm currently trying to test the following pice of code:

<footer class="footer">
    <div class="container">
        <div class="row">
            <form subscribe-directive="" ng-controller="SubscribeController" class="form col-xs-12 col-sm-8 col-md-6 col-lg-4 ng-scope ng-dirty ng-valid ng-valid-email">
                <h3 class="footer__title text-uppercase margin-bottom-25">Sign up!</h3>
                <div class="row">
                    <div class="col-sm-8 col-xs-7">
                        <input type="email" class="form-control ng-touched ng-dirty ng-valid ng-valid-email" ng-disabled="working || subscription.done" placeholder="Email Address" ng-model="subscription.email"> </div>
                    <div class="col-sm-4 col-xs-5">
                        <button ng-click="submit(subscription.email)" ng-disabled="working || !subscription.email || subscription.done" ng-class="{'working': working}" class="btn btn--inverse btn-red form-control" type="submit" disabled="disabled"> <span ng-bind-html="submitBtn" class="ng-binding">SUBSCRIBE</span> </button>
                    </div>
                </div>
                <p ng-show="callback_message" class="msg ng-binding ng-hide" ng-bind-html="callback_message"></p>
            </form>
            <nav class="col-xs-12 col-md-6 col-lg-offset-2">
                <ul class="nav navbar-nav navbar-right margin-bottom-25">
                    <li><a href="/press">Press</a>
                    </li>
                    <li><a href="/news">News</a>
                    </li>
                    <li><a href="/contact">Contact Us</a>
                    </li>
                    <li><a target="_blank" href="//test.com/en">Test Project</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li class="footer__social-icon"> <a target="_blank" href="https://www.facebook.com/"><i class="fa fa-facebook"></i></a> </li>
                    <li class="footer__social-icon"> <a target="_blank" href="https://twitter.com/"><i class="fa fa-twitter"></i></a> </li>
                    <li class="footer__social-icon"> <a target="_blank" href="https://www.youtube.com/user/"><i class="fa fa-youtube"></i></a> </li>
                </ul>
            </nav>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-6 copy"> <a href="/privacy">Privacy Policy</a>
                <br> Copyright &copy; Test-inc. All Rights Reserved. </div>
            <div class="col-xs-12 col-sm-6 text-right copy">
                <br> Microsoft Ventures. Supported by Microsoft Ventures London Accelerator </div>
        </div>
    </div>
</footer>

But when I do the following actions:

it('User should be correctly added to the update list ', function () {
        basePage.email.sendKeys('[email protected]');
        basePage.subscribe.click();
        browser.wait(EC.visibilityOf(thxPage.thankYou), 10000);
        expect(thxPage.thankYou.isPresent()).toBeTruthy();
    });

On my basePage I've:

    //this.email = element(by.model('subscription.email'));
    this.email = element(by.xpath('/html/body/footer/div/div[1]/form/div/div[1]/input'));
    this.waitlistBtn = element.all(by.binding('submitBtn'));
    this.subscribe = element(by.buttonText('SUBSCRIBE'));

I keep getting the follwing error for Internet Explorer, and only for IE (I'm running it against BrowserStack):

Failures:
1) New Landing page module verification --> User should be correctly added to the update list
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout (timers.js:110:15)

Here's my configuration

        { //failing capability
            name: testName,
            browserName: 'IE',
            browser_version: '11.0',
            os: 'Windows',
            os_version: '8.1',
            resolution: '2048x1536',
            'browserstack.user': browserstackUser,
            'browserstack.key': browserstackKey,
            'browserstack.debug': 'true',
            'browserstack.selenium_version': '2.45.0',
            'browserstack.ie.driver': '2.44',
            ignoreProtectedModeSettings: true
        }

I've tried what suggested here (http://stackoverflow.com/questions/30509744/protractor-test-not-working-with-ie-but-it-does-with-ff-chrome-safari/30509833?noredirect=1#comment49104762_30509833) and here (http://stackoverflow.com/questions/29218981/jasmine-2-async-callback-was-not-invoked-within-timeout-specified-by-jasmine-d)

And finally with this suggestion (http://stackoverflow.com/questions/25596706/using-protractor-test-with-bootstrapped-angularjs) I was able to at least send the keys to this input field but no matter how do I increase the time in the 'onPrepare()' , I keep getting the error.

⇒ JavaScript error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 116 milliseconds Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' System info: host: '208-52-166-65', ip: '208.52.166.65', os.name: 'windows', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_40' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=true, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:7096/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=true, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] Session ID: 82097f5c-fa33-4022-82d9-6f0f9d005d5b 

I must clarify that it does not happen with other test, it just happen with this part that's located at the footer of the page.

Can you please help? do you have any suggestion? or what can you see that I'm doing wrong?

Thanks

bmsoko avatar Jun 01 '15 04:06 bmsoko

As per our CONTRIBUTING.md, please ask this kind of question on Stack Overflow

sjelin avatar Jun 01 '15 18:06 sjelin