問題描述
使用 chrome 運行我的 Angular 應用場景,場景運行成功,但在 firefox 新版本 35.0b6 上發(fā)生了停止.任何人請幫助我提前謝謝.
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 執(zhí)行異步腳本
- Firefox 35:將參數(shù)傳遞給 executeScript 不起作用.一個>
目前最簡單的選擇是將 firefox 降級到最新的穩(wěn)定版本(當前為 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 日)發(fā)布,修復了 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
<小時>
僅供參考,我已經(jīng)重現(xiàn)了 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模板網(wǎng)!