visual studio 2013 - 'ExpectedConditions' does not exist on type 'typeof protractor' -


i'm writing protractor test in typescript in visual studio 2013 , i'm getting error:

property 'expectedconditions' not exist on type 'typeof protractor'.

i read similar question (here) did not situation.

this page objects code:

class sheetobjects {     ec = protractor.expectedconditions;     showlist = element(by.buttontext('show list'));     copyitem = element.all(by.binding('item.name')).get(2);     copydiv = element(by.classname('md-inline-list-icon-label'));     alertitem = element(by.binding('alert'));     alertdiv = element(by.css('[ng-if="alert"]'))      navigatetopage() {         browser.get('https://material.angularjs.org/latest/#/demo/material.components.bottomsheet');     }      waitforelements(element: any) {         browser.wait(() => element.ispresent(), 5000);     }      clickon(element: any) {         element.click();     } } module.exports = new sheetobjects(); 

this packages.config:

<?xml version="1.0" encoding="utf-8"?> <packages>   <package id="angular-protractor.typescript.definitelytyped" version="2.1.1" targetframework="net45" />   <package id="jasmine.typescript.definitelytyped" version="1.3.4" targetframework="net45" />   <package id="node.typescript.definitelytyped" version="1.5.6" targetframework="net45" />   <package id="protractor" version="0.5.0" targetframework="net45" />   <package id="selenium.webdriver" version="2.45.0" targetframework="net45" />   <package id="selenium-webdriver.typescript.definitelytyped" version="0.3.7" targetframework="net45" /> </packages> 

i figured expectedconditions included in 1 of packages far nothing has fixed it.

i figured expectedconditions included in 1 of packages far nothing has fixed it.

its not https://github.com/borisyankov/definitelytyped/search?utf8=%e2%9c%93&q=expectedconditions implies definition bit out of date current actual protractor code : http://angular.github.io/protractor/#/api?view=expectedconditions

hot fix

just use in untyped manner:

ec = (<any>protractor).expectedconditions; 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -