angularjs – 我如何在测试量角器时提供“rootelement”选项
发布时间:2020-12-17 07:18:08 所属栏目:安全 来源:网络整理
导读:当我执行node elementexplorer.js http://127.0.0.1:8080/app/view1时 我收到以下错误: There was a webdriver error: Error Error while waiting for Protractor to sync with the page: “root element (body) has no injector. this may mean it is not
当我执行node elementexplorer.js http://127.0.0.1:8080/app/view1时
我收到以下错误:
请告诉我如何提供rootelement选项.
目前,rootElement默认为body.如果您的身体没有ng-app,则会出现该错误.它可以手动设置.
您需要更改rootElement.您可以通过运行以下命令直接从交互式视图中执 browser.rootEl = 'div#ng-app-located-here'; 假设您的ng-app位于div#ng-app-located-here (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |