草庐IT

read_until

全部标签

javascript - Protractor : Read Table contents

我一直在为我的angularjs应用程序编写端到端测试,但我无法解决这个问题。我有一张包含数据的表格。我想提取第一行数据。我在ProtractorelementExplorer中做了这个,它打印出了所有3列的值element.all(by.repeater('iteminitems.list')).get(0).getText()JamesByrne1如果我这样做,它会打印出第一列的值element.all(by.repeater('iteminitems.list')).get(0).element(by.css('td')).getText()WARNING-morethanone

javascript - 未捕获的类型错误 : Cannot read property 'document' of undefined

我有以下功能,在我测试过的几台PC上运行良好。我已经在Chrome、IE和Firefox上测试过,没有任何问题。但是,有一台特定的PC(运行Chrome)在该行抛出此错误“UncaughtTypeError:Cannotreadproperty'document'ofundefined”:win.document.write(data);难道是因为win为null?如果是这样,为什么这台特定PC会出现这种情况?是否有一些Chrome设置需要设置?方法:functionviewReport(){console.info('generatingeventreport');varfrmDat

javascript - react : TypeError: Cannot read property 'propTypes' of undefined

请我为以下reactjs页面编写一个单元测试。exportdefaultclassCollapsibleextendsReact.Component{staticpropTypes={title:React.PropTypes.string,children:React.PropTypes.any,};render(){const{title}=this.props;return({title}{this.props.children});}}跟着啧啧Here我在下面写了我的测试describe('Collapsible',()=>{it('works',()=>{letrendere

javascript - [Vue 警告] : Error in render function: "TypeError: Cannot read property ' first_name' of null"

我有以下Navigation.vue组件:{{user.first_name}}import{mapActions,mapGetters}from'vuex'exportdefault{name:'hello',methods:{...mapActions(['myAccount'])},mounted:function(){if(localStorage.getItem('access_token')){this.myAccount()}},computed:{...mapGetters(['user'])}}此代码返回:[Vuewarn]:Errorinrenderfunction

javascript - 未捕获的类型错误 : Cannot read property 'offsetWidth' of null

这个问题在这里已经有了答案:GoogleMAPAPIUncaughtTypeError:Cannotreadproperty'offsetWidth'ofnull(26个答案)OffsetWidthnullorundefined(Can'tfindsolution)[closed](1个回答)关闭8年前。不幸的是,我在发布这个问题之前阅读了几个线程,我找不到适合我的问题的答案。这是我的代码片段-->functionpopulateIframe(id){varifrm=document.getElementById(id);ifrm.src="business_data_to_excel

javascript - Angular2 - 类型错误 : Cannot read property 'Id' of undefined in (Typescript)

我收到以下错误:angular2.dev.js:23925EXCEPTION:TypeError:Cannotreadproperty'Id'ofnullin[{{product.Id}}inProductEditComponent@0:68]抛出://Product-edit.component.ts:import{Component}from'angular2/core';import{IProduct}from'./product'import{ProductService}from'./product.service'import{RouteParams}from'angula

javascript - react - 类型错误 : Cannot read property 'props' of undefined

我正在尝试创建一个能够删除列表中项目的点击事件,但是当我点击它时,我得到“类型错误:无法读取未定义的属性‘props’”。我尽量坚持使用ES6,而且我很确定在某处绑定(bind)“this”是一件好事,但我尝试了很多地方但都没有成功。importReact,{Component}from'react';import'./App.css';classAppextendsComponent{render(){return();}}classStreetFighterextendsComponent{constructor(props){super(props);this.state={ch

javascript - 导入 anuglar2/forms 导致 "Cannot read property ' 未定义注释”

我正在尝试创建简单的表单,如http://angularjs.blogspot.no/2015/03/forms-in-angular-2.html中所述,但是当我添加从'angular2/forms'导入{forms,required};在崩溃中TypeError:Cannotreadproperty'annotations'ofundefinedTypeError:Cannotreadproperty'annotations'ofundefinedatReflectionCapabilities.System.register.execute.$__export.annotatio

javascript - promise - TypeError : Cannot read property 'then' of undefined

我想我只需要另一双眼睛看这个,因为我无法得到我在这里缺少的东西。$scope.checkout=function(form){//somecodeherefunctioncheckoutErrorHandler(error){//somecodehere}functiondisplaySuccessMessage(){$scope.success=true;cartService.emptyCart();}checkoutService.makePayment($scope.payment).then(function(i){//somecodeherecheckoutService.

javascript - 开 Jest + 火力地堡 : TypeError: Cannot read property 'defineProperties' of undefined

我目前正在做一个ReactNative项目,想使用FirebaseJSSDK。为了熟悉它的所有API,我想用Jest编写一些学习测试。这是我的测试:importFirebasefrom'firebase';describe('Firebase',function(){it('shouldwork',function() {expect(null).toBeNull()})});不幸的是我收到了这个错误:●测试套件运行失败TypeError:Cannotreadproperty'defineProperties'ofundefinedatnode_modules/firebase/app