2

I want to create a automation framework using screenplay pattern using protractor,serenity,typescript.

I don't know how to create screenplay project with serenity.

Pritam Maske
  • 2,670
  • 2
  • 22
  • 29
  • what is mean "screenplay"? You wanna make screenshot on ... ? – Oleksii Feb 01 '19 at 15:22
  • 1
    @Oleksii : Screenplay is patter as we have Page Object Model (POM) – Pritam Maske Feb 04 '19 at 07:26
  • There is a [template library project with exactly this](https://github.com/serenity-js/serenity-js-cucumber-protractor-template). So go there and click the *Use this template* button, You can also check a [working sample](http://working%20sample), https://github.com/serenity-js/todomvc-demo – AndreasM_DK Mar 10 '20 at 14:12

2 Answers2

3

Maybe start with the documentation? https://serenity-js.org/design/screenplay-pattern.html

Kacper
  • 1,201
  • 1
  • 9
  • 21
  • I have already gone through the documentation and didn't found my answer so that's why I have posted this question .... Anyway thanks ..!!!! – Pritam Maske Feb 05 '19 at 04:53
0

Use Following Steps To Create Project :

  1. Download and install Node.js
  2. install typescript- npm install -g typescript
  3. Download and install VS Code.
  4. Create a dir - "project-name".
  5. open command prompt in administrator mode and navigate to created dir path.
  6. execute "npm init" command and provides required details such as :

    A. package name : Name_of_project
    B. version : 1.0.0
    C. description : serenity-js screenplay with protractor project
    D. entry point : index.js
    E. test command : protractor protractor.conf.js
    F. git repository : git repository url
    E. keywords: press enter for nothing
    F. author : Pritam Maske
    G. license : press enter for "ISC"
    H. It will ask for confirmation, press enter if everything looks fine
    I. Above steps will result in package.json file in your project root directory   
    
  7. execute npm install serenity-js serenity-cli typescript ts-node protractor@ @types/node --save-dev
  8. execute npm install cucumber@1.x @types/cucumber --save-dev
  9. execute npm install chai chai-as-promised chai-smoothie @types/chai @types/chai-as-promised --save-dev
  10. Create Protractor.conf.js file
  11. Create "tsconfig.json"
  12. Create feature directory and add features files
  13. Create step_defination directory and add step_defination files
  14. Create screenplay directory with components,tasks sub-directory inside it
  15. Add ".gitignore" file with "target directory" entry inside it
Pritam Maske
  • 2,670
  • 2
  • 22
  • 29