protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Protractor snippets

Open alecxe opened this issue 10 years ago • 8 comments

While answering and asking questions on SO, I've seen and created multiple short snippets for various tasks. For example:

  • http://stackoverflow.com/a/34502670/771848
  • http://stackoverflow.com/a/27908252/771848
  • http://stackoverflow.com/a/21994788/771848
  • etc

Do you think it would be a good idea to have something like a Snippets page on http://angular.github.io/protractor/#/ where we can add some code samples for common/popular tasks?

I really think real-world examples is something we are missing documentation-wise. Thanks.

alecxe avatar Dec 29 '15 01:12 alecxe

Sure, I think that's reasonable. Just add a file at 'docs/snippets.md` and a link to it around here. The website generation script will take care of the rest.

sjelin avatar Dec 29 '15 04:12 sjelin

I think this is a great idea (it would help with a lot of common questions).

NickTomlin avatar Dec 30 '15 18:12 NickTomlin

This is awesome! We need more examples:

Here are some i've found:

http://stackoverflow.com/a/29397800/ - get current url

chrisl8888 avatar Jan 08 '16 17:01 chrisl8888

+1

magicode118 avatar Jan 14 '16 21:01 magicode118

What kind of Snippets are expecting here? Depending on which snippets , i would create a PR around it.

jags14385 avatar Feb 23 '16 03:02 jags14385

@jags14385 Probably any repetitive modular tasks one would do frequently. Login, click a button, select an iframe, scroll, etc.

chrisl8888 avatar Mar 02 '16 20:03 chrisl8888

All right, That helps. Will add those.

jags14385 avatar Mar 03 '16 23:03 jags14385

Closing in favor of https://github.com/angular/protractor/issues/3376

juliemr avatar Jul 14 '16 19:07 juliemr