All Questions
Tagged with cypress javascript
3,092
questions
0
votes
0
answers
22
views
Assigning input value to variable in Cypress [duplicate]
For a Cypress e2e test I need to read out the value of an input field into a variable, but I haven't found a proper way to do this. First, I tried this:
cy.get('[data-cy=password-input]')
.invoke('...
2
votes
2
answers
73
views
Using alias from before() in a it() test
In this example on the website, they say there is a simple way to use data you create in before() or beforeEach() in a testcase it(). But when I tried it it said my this.variable was undefined. After ...
-3
votes
1
answer
50
views
Read value of key from one json file to another json file [closed]
I am doing Cypress automation with JavaScript. In this, I want to read value of one JSON file to another JSON file. And based on that want to retrieve other values.
Below is my credentials.json file:
{...
0
votes
2
answers
42
views
cypress - how to continue running loop after assertion error
I have test that opens every item on the list. Then it validates if there are no empty ('--') fields. I want to log in console that there were empty fields and go to another item and run the loop till ...
1
vote
2
answers
59
views
Solution for parameterized testing in Cypress [duplicate]
I'm trying to merge bunch of tests that have same actions and checks using parametrized testing, but keep getting errors. I'm new to Cypress and JS in general, coming from .net background. Any help ...
0
votes
1
answer
29
views
How to capture scrolled into view element with Cypress and Applitools?
When I view my step in Applitools, it didn't capture the view where I scrolled into. It just captured the top of the page. How can I retain the scrolled view until it's captured in applitools? I've ...
0
votes
1
answer
59
views
Cypress opens link in new tab regardless removed/changed target
Cypress opens link in new tab, I already tried
cy.get("a[class='proof proofLink']").invoke('attr', 'target', '_self').click()
so as
cy.get("a[class='proof proofLink']").invoke('...
0
votes
0
answers
24
views
Cypress - cannot select option in dropdown inside the iframe
I have a dropdown like below:
The panel with the options is displayed only when the user starts typing.
The DOM input element is defined as below:
<input _ngcontent-ng-c3697127439="" ...
0
votes
1
answer
31
views
Failing on trying to use a function as a command in Cypress
I'm starting to work with Cypress and programming in general. I'm working on a very simple personal project executing TCs in a webpage.
I have this piece of code in 'registrationPage.js'
/// <...
0
votes
2
answers
33
views
Webpack compilation error with cypress-cucumber-preprocessor
Error Message: Webpack Compilation Error
Module parse failed: Unexpected token (1:15)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this ...
-1
votes
0
answers
24
views
The wrong block of code is being executed in an if/else statment in Cypress [duplicate]
In Cypress, I am trying to create a method that uses an if/else statement and should do the following:
It checks to see if the pagination button is displaying
If the pagination button is visible (...
0
votes
0
answers
34
views
Reuse results of random generation function as "const" [duplicate]
Newbie question here,
For Cypress test of a web project, I generated a random name for an item creation. I want to "store" the resultat as "const" in order to check that folder is ...
-1
votes
1
answer
66
views
Multiple-cucumber-html-reporter for Cypress Cucumber Framework is not generating HTML Report with attached failed screenshot [closed]
Objective: My objective is to generate HTML Report for my cypress cucumber framework with attached failed screenshots
I am using multiple-cucumber-html-reporter for generating an html report, but it ...
1
vote
2
answers
39
views
Cypress - Can I change the Viewport Based on The File Path of a Test?
I'm writing a test suite for an application that will predominantly have users on mobile devices, but is likely to have some admin users on laptops. For the majority of tests, I want a mobile ...
0
votes
2
answers
56
views
Trying to concatenate with variable value getting Undefined in Cypress [closed]
cy.get('#name').type('Mani')
var Name =cy.get('#name').text
cy.log(Name)
cy.log(Name+ 'Hello, this practice page and share your knowledge')
I stored the name in the 'Name' variable ...