Josh Horowitz
Josh Horowitz

Reputation: 665

Protractor failing with 'angular never provided resumeBootstrap'

For some reason, protractor is throwing the error angular never provided resumeBootstrap when navigating to the page using browser.get(). I tried switching data-ng-app to ng-app but that didn't help.

Full Error

Error: Angular could not be found on the page chrome-extension://anmdjkcbefbfgijkigepfecgojdnaida/control.html : angular never provided resumeBootstrap

spec

var driver = browser.driver;

describe('Chrome Extension Control Page', function () {
    it('Should be defined', function () {
        browser.get('chrome-extension://anmdjkcbefbfgijkigepfecgojdnaida/control.html');

        expect(driver.getTitle()).toEqual("Control Page");

        expect(driver.executeScript(function () {
            return typeof window !== "undefined";
        })).toBeTruthy();
        element(by.css('input')).click();
    });

});

html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Control Page</title>
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/bootstrap-switch.min.css">
    <link rel="stylesheet" href="assets/css/bootstrap-theme.css">
    <link rel="stylesheet" href="assets/css/navbar.css">
    <link rel="stylesheet" href="assets/css/popup.css">

    <script src="assets/js/lib/jquery.min.js"></script>
    <script src="assets/js/lib/angular.min.js"></script>

    <script src="assets/js/lib/bootstrap.min.js"></script>
    <script src="assets/js/lib/ui-bootstrap-tpls.min.js"></script>
    <script src="assets/js/lib/angular-bootstrap-switch.min.js"></script>
    <script src="assets/js/lib/bootstrap-switch.min.js"></script>

    <script src="assets/modules/translate-filter.js"></script>
    <script src="assets/modules/review-box.js"></script>
    <script src="assets/modules/enable-switch.js"></script>
    <script src="assets/modules/navbar.js"></script>
    <script src="assets/modules/extension-interface.js"></script>
    <script src="assets/modules/status-monitor.js"></script>
    <script src="assets/modules/state-monitor.js"></script>

    <script src="assets/js/control-ui.js"></script>
</head>
<body data-ng-app="controlPage">

<div ng-controller="ControlPageCtrl">
    <extension-navbar></extension-navbar>
    <div class="">
        <div class="jumbotron" style="background-color: transparent; margin-bottom: 0">
            <status-monitor-area></status-monitor-area>
            <hr>
            <div>
                <div class="row">
                    <div class="col-xs-8">
                        <state-message></state-message>
                    </div>
                    <div class="col-xs-4">
                        <enable-switch></enable-switch>
                    </div>
                </div>
                <state-progress-bar></state-progress-bar>
            </div>
            <state-information-box></state-information-box>
        </div>
    </div>
</div>

</body>
</html>

Upvotes: 1

Views: 865

Answers (1)

Josh Horowitz
Josh Horowitz

Reputation: 665

EDIT: This did not fix the problem. I have no idea why protractor isn't working.

Weird fix. It worked after I upgraded to the latest version of Angular.

I didn't consider it because the upgrade available was from v1.3.15 to v1.3.16. Seriously weird stuff, Angular.

Upvotes: 1

Related Questions