我正在尝试测试一个链接以转到 Twitter 页面。这可能吗?
索引.html
<a class="navbar-brand" href="https://twitter.com/foo">@foo</a>
业力-e2e.conf.js
proxies : {
'/': 'http://localhost:8000/',
'/twitter/': 'https://twitter.com/'
},
场景.js
it('should redirect to twitter page when link is clicked', function() {
element('.navbar a').click();
expect(browser().location().url()).toBe('/twitter/foo');
});
错误
Uncaught SecurityError: Blocked a frame with origin "http://localhost:9877" from accessing a cross-origin frame.
at /foobar/node_modules/karma-ng-scenario/lib/adapter.js:43