A collection of bite size examples.
angular / protractor-cookbook Goto Github PK
View Code? Open in Web Editor NEWExamples for using Protractor in various common scenarios.
License: MIT License
Examples for using Protractor in various common scenarios.
License: MIT License
alternative for browser.sleep()???
i have used browser.manage().timeouts().implicitlyWait(5000); inside on prepare() but still it didn't resolved my issue
HI,
There is a useful example for capturing performance logs in your repo(Thanks for that). I am trying to make use of it by logging my network calls to a text file. However, I am noticing that it preserves call from my previous pages as well and therefore when I filter the calls, I see more than expected number of network calls.
Is there a way to clear the performance calls before I execute my last test step and collect logs? Here is my code. Any suggestion would be helpful
After(async function(scenario) {
console.log("After Hook");
if (scenario.result.status === Status.FAILED) {
// screenShot is a base-64 encoded PNG
const screenShot = await browser.takeScreenshot();
this.attach(screenShot, "image/png");
}
await console.log("After if");
let browseLogs = await browser.manage().logs().get('performance');
// let browseLogs = await
await console.log(browseLogs.length);
browseLogs.forEach(async (logE)=> {
var message = await JSON.parse(logE.message).message;
if(message.params.response.url.includes(ADOBE_ANALYTICS_NETWORK))
{
await fs.appendFile(logs, JSON.stringify(message), (err) => {
if(err) throw err;
});
}
});
});
These are my config.ts
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'perfLoggingPrefs': {
'enableNetwork': true,
'enablePage': false
//'enableTimeline': false
}
},
loggingPrefs: {
performance: 'INFO',
browser: 'ALL'
}
},
Can I include spec files (.ts) in specs section of protractor.conf.ts and run tests directly without compiling them to .js files ?
I was trying to run example of protractor with typescript. But it si not working. It is giving me error that type is not assignable parameter if type promise.
Once the globals are removed and protractor-typescript features are more stable(breaking changes) would be sending a PR !
I have been using appium lately, I would send a PR for running browser tests with appium & protractor.
Request update docs for Angular's prtoractor cookbook using Docker.
--link
is being used for the browser nodes. This is now considered legacy in Docker and may be removed:
Warning: The --link flag is a deprecated legacy feature of Docker. It may eventually be removed. Unless you absolutely need to continue using it, we recommend that you use user-defined networks to facilitate communication between two containers instead of using --link. One feature that user-defined networks do not support that you can do with --link is sharing environmental variables between containers. However, you can use other mechanisms such as volumes to share environment variables between containers in a more controlled way.
After reviewing the Docker instructions, the seleniumAddress should be the docker container of the selenium grid. The documentation should have instructions to get the container's IP address.
See discussion on angular/protractor#3431 (comment)
Also, have a configuration that extends lib/config
typings to include w/ cucumber types angular/protractor#3919
https://github.com/juliemr/protractor-demo
require('protractor') no longer required, import the protractor object.
A good and detailed readme for the project is required so that it would help users! would be adding in coming PR's.
@cnishina It would be awesome if we have a title image in the readme, I was thinking we could make use of the image in your protractor-cookbook medium post -
@igniteram I defer to your expertise if you want to provide an example. Also there's a SO question with Protractor + cucumber 2.0.0-rc2. Do you know anything about cucumber 2.0.0?
This would help with angular/protractor#1205
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.