Questions tagged [serenity-js]

Questions about the Serenity/JS acceptance testing library, as well as the JavaScript and TypeScript implementation of the Screenplay Pattern.

73 questions
33
votes
8 answers

Error: zone-testing.js is needed for the fakeAsync() test helper but could not be found. When running test on Angular webapp using serenityJS+Jasmine

I am trying to run component testing on Angular web app using serenityJS + Jasmine but encountered the error below. Any idea how I can resolve this issue? Message: Error: zone-testing.js is needed for the fakeAsync() test helper but could not be…
Zhen Wei
  • 339
  • 1
  • 3
  • 3
2
votes
0 answers

Have modified with the recommended protractor.conf.js but still not able to bypass basic authenticator

Thanks for providing the solution with regards to the fix to popup credential (PreviousPost). I have attempted to do the same thing too on my Protractor.conf.js const { Authenticator } = require('authenticator-browser-extension'); exports.config =…
2
votes
2 answers

How to create screenplay pattern project with typescript,serenity and cucumber?

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
1
vote
1 answer

Is there a way to pause/resume a serenity-js test run to check the browser?

In a test context, we have been setting up a mock to behave a certain way including accessing the service under test, and we want to inspect the browser mid test because it isn't working in the way we expected. Accessing the mock url direct doesnt…
1
vote
1 answer

Step Definitions not implemented - Cucumber with Angular9 & Serenity/JS

When I run my Cucumber step definitions using protractor e2e/protractor.conf.js the test reporter returns: Logging in to application: User navigates to site from outside company network Given User is not on company network …
1
vote
1 answer

Is there a way to execute a JavaScript string as some functions? I'm using eval but it is not working

Is there a way to execute a JavaScript string as some functions? I'm using eval but it isn't working. I'm trying this as I need to read values from a YML file for my serenity js test. This is what I'm trying to do this.data = "element1.element2"…
Rodrigo
  • 65
  • 1
  • 5
1
vote
1 answer

How do I make a Task with two parameters?

In the Serenity-js book we have one example of a Task with just one parameter : // spec/screenplay/tasks/add_a_todo_item.ts import { PerformsTasks, Task } from 'serenity-js/protractor'; export class AddATodoItem implements Task { static…
Dapangma
  • 127
  • 1
  • 1
  • 10
1
vote
0 answers

Can serenity and protractor used for node.js applications?

I have a node.js application. Is it also possible to us Serentity-js, Cucumber and Protractor for node.js applications or is it only possible for Angular applications?
cash
  • 11
  • 1
1
vote
3 answers

How to initialize a driver object so it can be used by all classes

How to initialize the driver so it can be used by all classes Hi All, I am writing a test automation framework in JAVA using Appium, Selenium and Cucumber. I start off by declaring an Appium Driver in one of my test step files and then this gets…
1
vote
1 answer

Start single Serenity scenario from command line

My team received ownership of a webapp. Tests are written with junit suites and serenity. Good things, there a good test coverage. Problem come when you need to run that single test/scenario that is still failing and you need to wait >30min to run…
Kbii
  • 185
  • 1
  • 3
  • 11
1
vote
1 answer

syntax for verifying if the element is present for protractor serenity

What is the syntax for checking if the element is present? I need to check if the element is present in order to go further in my test. If the element is not present i want to perform some other action. This is what I am trying but the syntax does…
1
vote
1 answer

Perform a drag and drop in serenity-js

I'm searching for a way to perform a drag and drop with serenity-js (http://serenity-js.org/) but I can't find any examples. What I can find is the protractor way, but because protractor is baked in the serenity-js framework I was wondering how to…
Carlo Matulessy
  • 975
  • 1
  • 13
  • 27
1
vote
1 answer

using Serenity-js framework ,how to locate a shadow element whose parent has an id which is a normal DOM

please tell me how i can locate an element in the below form using serenity-js Target. Below is my Dom to the page i am trying to automate. so here its a dropdown which you can see as which has id="splc" which is a normal DOM .. but the content…
Pringa
  • 91
  • 2
  • 6
1
vote
1 answer

How to use serenity js Attribute to assert if the element is disabled

I have the following DOM on the page Also i have a (screen-play) component to target it's attribute import {Attribute, Target} from…
Ali
  • 2,993
  • 3
  • 19
  • 42
1
vote
1 answer

Serenity-JS Select an Element from a list

I have filtered drop down list which list all tasks. When I type letters into the search box I am presented with a list of tasks that start with those letters. My Serenity-JS / Cucumber test inputs the first two characters in the 'Given' see below…
1
2 3 4 5