Giter Club home page Giter Club logo

Comments (16)

mike123vn avatar mike123vn commented on June 3, 2024 1

Thank you so much.
i have solved my issue :)
With ES6
npm run tsc ==>Work ok after i remove @typing/es6-promise and exclude some js file
With ES5:
I still get an error in ES5 even try npm run tsc

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024 1

you should change the compiler target to ES6

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn can you also share NodeJS version that you are using locally and on jenkins?
Library was not tested (and probably will not work) on anything lover than 6.0

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024

Node version in My Macbook is v6.9.1 (I'm using it now)
Node version in Jenkin and my desktop is 7.x ( i don't remember exactly, now I'm off work)
This error appears both of them (Macbook and desktop) when changing "target" to es5.

The code i believe that it make error is
textBox(this.txt_LoginUsername).setContent(Username);

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn Can you also share test case file? I can't see any issues in pagefragments.

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024

/

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024

I belive that 100% error driven from file i called element_types.pfrag.ts which you can see in my first post. After getting this error, i . replace the its .js file in ES5 by the ES6. The error runs away.

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn Can it be caused by wrong typescript compilation configuration?

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024

No i don't think so. As i mentioned before it happens in webstorm and grunt-ts with es5 as well. If you need to get full source code, give me email , i will send you

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn yes please. I think it will be easier - [email protected]

from protractor-element-extend.

mike123vn avatar mike123vn commented on June 3, 2024

i just send email. Kindly change file extension to rar

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn
I checked your project. This is grunt-ts configuration issue. I was able to compile project with npm run tsc directly, and it works fine. This is not protractor-element-extend issue.

Exclude grunt-ts and use compiler directly (or from npm scripts)

from protractor-element-extend.

Xotabu4 avatar Xotabu4 commented on June 3, 2024

@mike123vn thank you for using my lib! Feel free to give a github star to this repo and propose new features!

from protractor-element-extend.

valburyakov avatar valburyakov commented on June 3, 2024

Hello @Xotabu4 , i faced with the same issue with protractor-cucumber-framework, i use following conf:

cucumberOpts: {
    compiler: "ts:ts-node/register",
    format: "pretty",
    require: [
      "e2e/**/*.steps.ts",
      "e2e/support/hooks.ts"
    ]
}

node: 7.9.0
ts-node: 3.0.4
protractor: 5.1.2
typescript: 2.3.3

Sample code:

class ListResult extends BaseFragment {
  openProfile() {
    return this.$('.result-name a').click();
  }
}

class ListsResultsCollection extends BaseArrayFragment<ListResult> {
  constructor(elementsToExtend: ElementArrayFinder) {
    super(elementsToExtend, ListResult);
  }
}
export class ListsPage {
   listResults = $$('.list-result.row');
   resultsCollention = new ListsResultsCollection(this.listResults);

  openCandidateProfile(index: number) {
      return this.resultsCollention.get(index).openProfile()
  }
}

from protractor-element-extend.

valburyakov avatar valburyakov commented on June 3, 2024

@mike123vn yes, i see, but the problem is that i don't how to pass tsconfig.e2e which lives in e2e folder to cucumber compiler: ts-node property

from protractor-element-extend.

valburyakov avatar valburyakov commented on June 3, 2024

Finally, i sorted it out using require('ts-node').register({project: 'e2e'}); in onPrepare block instead of using compiler in cucumberOpts. And now it works with target: es6

from protractor-element-extend.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.