gpt4 book ai didi

javascript - Protractor 失败并显示 'angular never provided resumeBootstrap'

转载 作者:行者123 更新时间:2023-11-28 00:08:46 27 4
gpt4 key购买 nike

由于某种原因,使用 browser.get() 导航到页面时, Protractor 抛出错误 Angular neverprovidedresumeBootstrap。我尝试将 data-ng-app 切换为 ng-app,但这没有帮助。

完全错误

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

规范

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>

最佳答案

编辑:这并没有解决问题。我不知道为什么 Protractor 不工作。

奇怪的修复。在我升级到最新版本的 Angular 后它就起作用了。

我没有考虑它,因为可用的升级是从 v1.3.15 到 v1.3.16。 Angular,真是奇怪的东西。

关于javascript - Protractor 失败并显示 'angular never provided resumeBootstrap',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31093778/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com