问题描述
使用 chrome 运行我的 Angular 应用场景,场景运行成功,但在 firefox 新版本 35.0b6 上发生了停止.任何人请帮助我提前谢谢.
Run my Angular app scenarios with chrome the scenarios are run successfully, but the halt is occurred at firefox new version 35.0b6. Any one please help me thanks in advance.
我正在使用量角器 1.4.0.我的场景:
I'm using protractor 1.4.0. My scenario:
describe('99ccs e2e testing', function() {
it('check it have a title 99CCS', function() {
browser.get('http://99ccs.com/ccsnew/#/login');
//it checks the "http://99ccs.com/ccsnew/" page contains a title "99CCS"
expect(browser.getTitle()).toEqual('99CCS');
//it checks when user enter the URL as "http://99ccs.com/ccsnew/" it navigates to "http://99ccs.com/ccsnew/#/login"
browser.get('http://99ccs.com/ccsnew/');
expect(browser.getLocationAbsUrl()).toBe('http://99ccs.com/ccsnew/#/login');
//it checks when user enter the URL as "http://99ccs.com/ccsnew/" it navigates to Login page or not
browser.getLocationAbsUrl().then(function(url) {
expect(url.split('#')[1]).toBe('/login');
});
expect(browser.get('http://99ccs.com/ccsnew/')).toEqual(browser.get('http://99ccs.com/ccsnew/#/login'));
//it checks if we give any location url from 99ccs.com/ccsnew without login it navigates to Login page or not
expect(browser.get('http://99ccs.com/ccsnew/#/ts/edit/131')).toEqual(browser.get('http://99ccs.com/ccsnew/#/login'));
});
});
推荐答案
Selenium 2.44 与 Firefox 35 不兼容.相关问题:
- 注意:Protractor 不适用于 Firefox 35
- FirefoxDriver 无法使用 FireFox 35 执行异步脚本
- Firefox 35:将参数传递给 executeScript 不起作用.一个>
目前最简单的选择是将 firefox 降级到最新的稳定版本(当前为 34.0.5).
The easiest option right now would be to downgrade firefox to the latest stable version (currently 34.0.5).
更新: selenium 2.45 已于今天(2015 年 2 月 28 日)发布,修复了 firefox 兼容性问题.目前,要让 protractor 与 selenium 2.45 一起工作 - 直接从 protractor github master 分支安装它:
UPDATE: selenium 2.45 with firefox compatibility issues fixed was released today (Feb 28 2015). At the moment, to have protractor work with selenium 2.45 - install it from the protractor github master branch directly:
$ npm install angular/protractor
或
$ npm install git+https://git@github.com/angular/protractor.git
<小时>
仅供参考,我已经重现了 protractor 1.5 和angularjs.org"protractor 的相同连接问题教程 测试用例:
describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('http://www.angularjs.org');
element(by.model('todoText')).sendKeys('write a protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write a protractor test');
});
});
这篇关于将 Firefox 35 与量角器一起使用会导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!




大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)