Questions tagged [serenity-js]
Questions about the Serenity/JS acceptance testing library, as well as the JavaScript and TypeScript implementation of the Screenplay Pattern.
71
questions
0
votes
0
answers
42
views
Problem in using chai-smoothie with angular 12
Can you please suggest in solving below dependency issue.
I am using angular 12.
https://stackblitz.com/edit/angular-ivy-n96mek is stackblitz project.
Below versions iam using
Angular CLI: 12.0.0
Node:...
0
votes
0
answers
18
views
Serenity-JS BBD Report works with parallel testing?
Does anyone know if the serenity-js html report still works when excecuting parallel testing of the features?
0
votes
0
answers
122
views
Serenity/JS - How to test a file download?
I need to ensure that a click on download-button in the ui does really download that expected file in the correct size.
I know how to perform a click or enter-event on a button, but can I analyse the ...
0
votes
0
answers
48
views
Serenity JS by.tagName('a')[0] from protractor returns undefined
Hello I am new to JavaScript, TypeScript, and Serenity JS. I am trying to get URL's from HTML of a website. Google for this example.
My actor and screenplay is as follows:
'''
describe(TodoMVC app, () ...
17
votes
4
answers
8k
views
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 ...
0
votes
2
answers
155
views
'serenity-bdd run' gives 'The "path" argument must be of type string' error in Docker
I have a Serenity-JS project that runs normally on the command line. I am trying to package it into a Docker container for use in an Azure pipeline, which is a model we've used with other projects.
...
0
votes
1
answer
37
views
download specific version of serenity-cli jar in package.json protractor project
Is there a way I can download specific version of serenity-cli jar.
senario: I want to use the specific version of old jar of cli, where do I mention the version of the jar in the package.json .
TIA
0
votes
1
answer
252
views
How to get the text from a particular xpath and how to store that in a string using Serenity
I want to fetch the text from an xpath and store it in a string.
After entering all inputs and submitting , a new code will get generated and which looks like Customercode: IN02732114(number will ...
0
votes
1
answer
35
views
Click.on(link) vs Navigate.to()
My system under test is a website, that dynamically creates pages from a config file and an index page with clickable icons to these pages. So far I could not find a way to iterate through the icons ...
0
votes
1
answer
294
views
SerenityJS - Problem Getting Started with NPM CI Command - Serenity-BDD CLI jar
I'm on my Mac at work and I'm trying to get started with the Serenity JS template project found here: https://github.com/serenity-js/serenity-js-cucumber-protractor-template. After I installed all ...
1
vote
1
answer
219
views
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 ...
2
votes
0
answers
52
views
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('...
0
votes
0
answers
1k
views
Type 'Promise<ApolloQueryResult<any>>' is missing the following properties from type 'ApolloQueryResult<any>': data, loading, networkStatus, stale
Someone that can help me to fix the following error:
(method) CallGraphQL.executeQuery(queryToExecute: DocumentNode): Promise<ApolloQueryResult<any>>
Type 'Promise<ApolloQueryResult&...
0
votes
1
answer
79
views
Below code is not woking with Chrome browser
I have created a reusable function which clicks the check box of a particular row and returns the text of that row.
CheckBoxXpath-> private static final String ...
1
vote
1
answer
109
views
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'...
1
vote
1
answer
291
views
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 ...
0
votes
1
answer
717
views
Error: No selenium server jar found at "Location"
I am facing following issue :
Error: No selenium server jar found at
C:\ui-automation\serenity-1.0\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.0....
0
votes
1
answer
560
views
How to update selenium-server-standalone to specific version for protractor and node-js?
How to update selenium-server-standalone to specific version ?
As in my project I want version 3.0.1 but when I ran
webdriver-manager update
It downloads "3.141.59" version which is not ...
0
votes
1
answer
2k
views
How to assert that web element is visible on the screen using serenity-js?
I am using Serenity-js BDD framework with screenplay pattern in my project. Here I am not able to perform assertion for visibility of an element on web-page using Ensure class's "that" method.
Code : ...
1
vote
0
answers
51
views
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?
0
votes
1
answer
162
views
End to end test with serenity-js , cumber ,protractor and jasmine
I am new to serenity-js and trying to implement it for end to end test case for an angular application.
My team has already written the unit test case using jasmine. As I know, serenity-js don't ...
0
votes
1
answer
521
views
CSRF token validation failed, How to fix using serenity rest assured framework?
I am using serenity rest assured framework, I do the below steps.
1) Using GET request am able to fetch the CSRF token in the response header.
2) Then I try to use the same fetched CSRF token to ...
0
votes
1
answer
92
views
Do we need to have the Browser installed on GUI less RedHat Linux m/c when we are running headless tests using XVFB?
Since we are facing problems with running headless Serenity tests using the installed Firefox browser on a Jenkins Server running on RedHat Linux machine, we installed XVFB to run the tests.
Our ...
0
votes
1
answer
364
views
Is it enough to mention which browser you want to run the tests with in serenity.properties file?
Is it enough to mention which browser you want to run the tests with in serenity.properties file ?
Like...
Chrome Browser Testing
webdriver.driver=chrome
headless.mode = true
drivers.windows....
0
votes
1
answer
179
views
How to navigate through a paginated list until find a text with Serenity-JS?
I need to assert that an element I created was added to a list, but it is added at the end of it and it is paginated.
I'm thinking of navigating through each page by calling another task this way:
...
0
votes
1
answer
32
views
How to expand the Start task with new scenarios
I've just learned about serenity-js and am giving it a go. I'm following the tutorial and noticed the follow example:
james.attemptsTo(
Start.withAnEmptyTodoList(),
AddATodoItem.called('Buy ...
0
votes
1
answer
53
views
A feature file having two individual scenarios having weird web locator problems
I have a feature file with having two scenarios: one for login to website, another one doing some actions on the logged in page.
If I arrange the feature file with just one scenario, it is working ...
0
votes
1
answer
163
views
Referring to John's Serenity BDD book, can a @Test annotation encompass a complete scenario, as part of running SerenityRunner.class?
I am referring to John's Serenity bdd book @ https://serenity-bdd.github.io/theserenitybook/latest/step-libraries.html. Very in the beginning, John seem to be enclosing a set of @given @when @then ...
1
vote
3
answers
3k
views
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 ...
2
votes
2
answers
725
views
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.
0
votes
1
answer
174
views
Serenity: How to differentiate the reports based on the platform used?
We are using serenity reports for both platforms to run automation scripts but not sure how to differentiate the features or scenarios in the reports to say which platform is belonged to. I have used ...
0
votes
0
answers
500
views
How do i Upload a file using serenity screenplay pattern
I'm working on serenity screenplay pattern.
I need to upload a file to a textbox on a webpage but I got the following error:
"TargettedAction invalid element state: Element must be user-editable
...
0
votes
1
answer
932
views
Need an example of how to do a button click on serenity-js
I am really new to serenity-js and Protractor. I followed the 'https://github.com/serenity-js/seed-cucumber/tree/master/features' to get familiar with serenity-js. Can someone give me an example of ...
1
vote
1
answer
860
views
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 ...
0
votes
1
answer
765
views
How do I assert the value of an input field with chai/chai-smoothie?
Thanks for chai-smoothie!
How do I assert the value of an input field with chai/chai-smoothie?
Given that getText() is always empty, and we should use element.getAttribute('value') (see: How to ...
0
votes
1
answer
190
views
Serenity-JS, step function timed out
I'm in my first steps with Serenity and I've been stuck for 2 days with this problem.
I've got:
navigate to the login page
write the username
write the password
click the login button
and then, in ...
0
votes
1
answer
1k
views
WebDriverError when running Protractor tests against Safari
First of all, thank you so much in advance for all the help. I have been trying to googling possible solutions, but couldn't find any lead.
I am trying to run some UI tests with the SerenityJS ...
0
votes
1
answer
363
views
How to access multiple id elements in serenity-js
I have 5 links with the same name and id and linktext. I am using serenity-js. how can I access the 4th link
page.ts has
static link = Target.the('click the 4th link').located(by.linktext('link'));
0
votes
2
answers
253
views
Serenity/JS: Why assertion in See.if return empty string sometimes?
I am facing an issue with See.if() - it returns empty string sometimes.
Tech stack used:
Serenity/JS with cucumber and protractor
P-Growl - Primeng growl component
Chai as promised - expect method
...
0
votes
1
answer
710
views
protractor.browser.refresh in --headless
running into a road block and for the life of me, cant find anything on google
I am using serenity-js, currently does not have refresh interaction, therefore created one locally.
here is my class :
...
0
votes
1
answer
452
views
How to deal with corner/edge/error cases with serenity
I like the idea of focusing on business scenarios. However, as a developper I also want error cases to have automated non-regression tests.
For example, in a e-commerce feature, there would be a ...
0
votes
1
answer
114
views
serenity-js / cucumber / chai Promise AssertionError need some assistance
Im losing it, I feel like im doing this right BUT cant figure out why this simple test fails
I got a feature file like so
Scenario: List all accounts in the tenant
Given that Keith has ...
0
votes
1
answer
3k
views
cucumber function has 1 arguments, should have 2 (if synchronous or returning a promise)
I have a feature file with:
Scenario: List all accounts in the tenant
Given that Keith has navigated to the tenant account list
When he views the accounts in the table that includes name, ...
0
votes
1
answer
226
views
serenity-js - Error: TypeError: _.chain(...).toPairs is not a function
I have a project with the following inside the package.json
I have seen this same error on this post and have taken the same steps to fix by Jan but it was to no avail. I have blew away my ...
1
vote
1
answer
1k
views
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 ...
0
votes
2
answers
765
views
How to dynamize username and password
How can i use the data driven or dynamic username and password when i enter the actor name in the cucumber it should use the respective password maybe from a json file or something depending on the ...
0
votes
1
answer
472
views
How to compare two locator value using chai assertion & serenity
I am new to Serenity and Protractor, so need your help for below query.
Using - Protractor, Chai assertion, Screenplay serenity, Cucumber, TypeScript
I have below 2 locators in my locator file:
...
0
votes
1
answer
609
views
Base questions with Serenity/JS?
I have just started looking into switching to Serenity/JS and wanted to know if it's best practice to have base Questions/Tasks?
There are many times I will want to check if a field is blank or has ...
0
votes
1
answer
3k
views
Not able to read the step definitions files of Protractor cucumber e2e tests
i am new bee into Protractor.
i am using Protractor with typescript and Serenity js library for reporting purpose.
Project structure : Project Structure
Issue log :
PS R:\protractor\...
1
vote
1
answer
1k
views
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 ...