使用Firefox 35量角器结果为错误 [英] Using Firefox 35 with protractor results into an error

查看:142
本文介绍了使用Firefox 35量角器结果为错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

镀铬的情景成功运行,但在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'));
    });
});

推荐答案

硒2.44不与Firefox兼容35 。相关的问题:

  • Heads up: Protractor is not working with Firefox 35
  • FirefoxDriver fails to execute async script with FireFox 35
  • Firefox 35: Passing arguments to executeScript isn't working.

最简单的方法,现在将的降级到Firefox的最新稳定版的(目前34.0.5)。

The easiest option right now would be to downgrade firefox to the latest stable version (currently 34.0.5).

更新: 2.45固定今天发布了Firefox的兼容性问题(2015年2月28日)。目前,有量角器工作硒 2.45 - 从量角器的github主分支直接安装:

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


仅供参考,我已经再现量角器1.5和angularjs.org量角器相同的连接问题教程测试用例:

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量角器结果为错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆