【发布时间】:2015-08-11 03:35:02
【问题描述】:
我目前正在处理针对 IE 的量角器测试的问题。
我正在使用 Protractor + Jasmine + Node.js
我正在测试的页面部分如下:
<h2 collapser="" class="title text-center text-uppercase active">Tech Specs <i class="plus-icon"></i></h2>
我有以下测试:
it('User should be able to see module 11 Tech Specs collapsing and uncolapsing', function () {
basePage.techSpecCollapser.click();
browser.sleep(1000);
expect(basePage.techSpecContainer.isDisplayed()).toBeTruthy();
});
这是控制台输出:
Landing page module verification -->
User should be able to see module 11 Tech Specs collapsing and uncollapsing - fail
1) New Landing page module verification --> User should be able to see module 11 Tech Specs collapsing and uncolapsing
at 15.446s [Thu, 28 May 2015 14:23:08 GMT]
Message:
Expected false to be truthy.
Stacktrace:
Error: Failed expectation
at [object Object].<anonymous> (/Users/test/Documents/Dev/test/sandBox/specs/landing_page_spec.js:44:58)
Finished in 15.448 seconds
1 test, 1 assertion, 1 failure
通过观察测试运行,我看到网页的一部分没有显示出来。我试过了:
- 强制滚动到页面的该部分:无效。
- 聚焦页面的该部分:不起作用。
有人遇到过同样的问题吗?可以让它工作而且很简单的测试!
【问题讨论】:
标签: javascript internet-explorer selenium jasmine protractor