Comments (20)
👍
from protractor.
I'm currently working on using Angular, Protractor, and Cucumber.js together and have a working example here without an adapter: https://github.com/dskang/angular-cucumber-example
In the example above, I'm using protractor as a library and using cucumber.js to run the tests instead of the protractor runner.
On a side note, I'm having some trouble understanding the role of adapters in WebDriverJS/Protractor and would appreciate if someone could explain. I see adapters doing two things:
- Wrapping matchers (expect, etc.)
- Wrapping control flow functions (it, beforeEach, afterEach, etc.)
Wrapping matchers makes sense because they provide a nicer way to using matchers with the promises that the WebDriverJS API returns. For example, writing
expect(el.getText()).toEqual('test');
is nicer than writing
el.getText().then(function(text) {
expect(text).toEqual('test');
});
However, I'm having trouble understanding the point of wrapping control flow functions as every command in the WebDriverJS API is already automatically wrapped in ControlFlow#execute()
so that they are executed in the right order. What purpose does wrapping it
, beforeEach
, and afterEach
serve? I assume doing so avoids some class of bugs regarding code being executed out of order, but I'm having trouble understanding how and when this would occur and would love to see some examples.
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
👍
from protractor.
Looking for info on best way to work with something like cucumber and protractor together. Do all these thumbs up indicate interest or that @DSKang's method is working for you?
from protractor.
@stu-salsbury Interest
from protractor.
+1
from protractor.
Done in 88c339f
from protractor.
@juliemr You rock Julie
from protractor.
@yannickcr Thanks a bunch for working it out!
from protractor.
@juliemr thanks a lot for doing this, @mattwynne and I were going to add Cucumber support tonight and realised it was already in protractor :)
from protractor.
Thanks @juliemr!
from protractor.
Related Issues (20)
- Support on Protractor after 2022 and any plans for licensed version HOT 7
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. HOT 4
- Callback function is taking long after completing the run in the protractor testcase
- [BUG] Upgrade transitive dependency "[email protected]" to fix CVE-2021-3918 HOT 1
- [BUG] input with dropdown use clear the selected tag won't remove, and click will click on the text not the element.
- Is protractor no longer working when using Angular 13? HOT 8
- protractor.Key.chord() broken in the latest chromedriver HOT 3
- Prototype Pollution in minimist
- qs version CVE-2021-44907 (High) detected in my repo dependencies
- need support for finding element under shadow root HOT 3
- Feature request - html to pdf
- Git.io deprecation notice
- Getting the ERROR "This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and may no longer be used." When I try to use restart() or close() method HOT 2
- Deprecated warning with Protractor HOT 2
- Interview partners for research about communication in GitHub projects wanted
- Can existing Protractor automation scripts developed in year 2020 supported on windows 2019 OS server
- webdriver Manager , chrome version higher then 114 HOT 3
- Migrate Protractor to Playwright
- Meera HOT 1
- Performance Dashboard
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.