Comments (16)
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.
you should change the compiler target to ES6
from protractor-element-extend.
@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.
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.
@mike123vn Can you also share test case file? I can't see any issues in pagefragments.
from protractor-element-extend.
/
from protractor-element-extend.
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.
@mike123vn Can it be caused by wrong typescript compilation configuration?
from protractor-element-extend.
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.
@mike123vn yes please. I think it will be easier - [email protected]
from protractor-element-extend.
i just send email. Kindly change file extension to rar
from protractor-element-extend.
@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.
@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.
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.
@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.
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)
- Unittests needed HOT 1
- Can't use Protractor $ and $$ shortcuts on calls to this within Extended Class HOT 4
- Cannot override a method HOT 2
- Find elements from a parent element HOT 22
- : TypeError: Class constructor BaseFragment cannot be invoked without 'new' (ES5)
- Create more usage examples and tricks
- Looking for some help! HOT 8
- Make ElementArrayFinderParent to return custom objects on get, first, last, filter, map, each ... HOT 3
- Can't call overridden method HOT 10
- Add support for shadowRoot property
- Filter function does not work properly if constructor has no parameters
- Docs, readme.md, examples needed HOT 1
- Integrate with travis.ci
- Investigate possibility to set default parameter element as $('body')
- Investigate possibility to print nice locators for fragments on error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protractor-element-extend.