将 Firefox 35 与量角器一起使用会导致错误

2023-06-15前端开发问题
2

本文介绍了将 Firefox 35 与量角器一起使用会导致错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

使用 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 兼容性问题.目前,要让 protractorselenium 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 与量角器一起使用会导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

Fatal error: Call to a member function fetch_assoc() on a no
业务场景:使用update语句去更新数据库字段。 原因:update接收值不正确。原来代码: $query = "UPDATE student SET date = now() WHERE id = $id";$result = $mysqli-query($query2) or die($mysqli-error); // 问题出现了在这句 $data = $result-fetch_ass...
2024-12-13 前端开发问题
136

layui实现laydate日历控件控制之前日期不可选择
具体实现代码如下: laydate.render({ elem: '#start_time', min:0, //,type: 'date' //默认,可不填}); 只要加一个min参数,就可以控制了。0表示之前的日期不可...
2024-11-29 前端开发问题
133

如何使用百度地图API获取地理位置信息
首先,我们需要在百度地图开放平台上申请一个开发者账号,并创建一个应用。在创建应用的过程中,我们会得到一个密钥(ak),这是调用API的凭证。 接下来,我们需要准备一个PHP文件,以便可以在网页中调用。首先,我们需要引入百度地图API的JS文件,代码如下...
2024-11-22 前端开发问题
244

ajax请求获取json数据并处理的实例代码
ajax请求获取json数据并处理的实例代码 $.ajax({ type: 'GET', url: 'https://localhost:44369/UserInfo/EditUserJson',//请求数据 data: json,//传递数据 //dataType:'json/text',//预计服务器返回的类型 timeout: 3000,//请求超时的时间 //回调函数传参 suc...
2024-11-22 前端开发问题
215

js删除数组中指定元素的5种方法
在JavaScript中,我们有多种方法可以删除数组中的指定元素。以下给出了5种常见的方法并提供了相应的代码示例: 1.使用splice()方法: let array = [0, 1, 2, 3, 4, 5];let index = array.indexOf(2);if (index -1) { array.splice(index, 1);}// array = [0,...
2024-11-22 前端开发问题
182

layui 实现实时刷新一个外部的div
主页面上显示了一个合计,在删除和增加的时候需要更改这个总套数的值: //html代码div class="layui-inline layui-show-xs-block" style="margin-left: 10px" id="sumDiv"spanSOP合计:/spanspan${totalNum}/spanspan套/span/div 于是在我们删除这个条数据后,...
2024-11-14 前端开发问题
156