67 questions
0
votes
1
answer
32
views
In cypress, I wanted to execute a flow based on a web locator visiblity. How to achieve it? [duplicate]
In my web page I have a locator which is identified by...
cy.get('.app-text')
In my case, I want to execute different flows based on the visibility of the above locator in the page.
If above locator ...
3
votes
1
answer
58
views
Cypress - How to only click button if it contains "chevron_right"
This button has 2 states, "chevron_right" when disabled. And "expand_more" when enabled.
Its default state is "chevron_right"
The following code will click on the button ...
0
votes
0
answers
20
views
Conditional testing in cypress/typescript [duplicate]
Need help with conditional testing of cypress/typescript.
After pressing button ".button1", I need to check for the presence of button ".button2", and if it exists - press it and ...
0
votes
0
answers
35
views
Cannot break .each() even though if condition true in cypress [duplicate]
Below is my it block code which has each loop and it does not breaking even though I passed return false when the if condition true and continue executing the loop.
cy.get('@gemTitle').then((gemTitle) ...
-2
votes
1
answer
65
views
Cypress If-Else using Contains [closed]
My script looks like below
const item ["a1", "a2",..............,"a45"]
const regex = new RegExp(`${item .join('|')}`, 'g')
if(cy.get('body').contains(regex)){
...
1
vote
1
answer
54
views
How to skip failing part in Cypress test script
what is expected from the below code is get_plz_ChooseGroup will be skipped and not trigger a test failure if the element is not visible after 5000 seconds
Login_Page_POS.get_plz_ChooseGroup({ timeout:...
0
votes
0
answers
39
views
Cypress e2e.js file giving error while connecting SQL server using Cucumber [duplicate]
I am not able connect DB connection using Cypress. Facing issue e2e.js by giving loadDBCommand.
DBConnection.feature
Scenanrio: Connect DB using SQL Server
Given Update the Agent Details
Package.json
...
0
votes
0
answers
15
views
select multiple customers and check validation; a valid error message shows if incorrect
if i am selecting the customer and check for valid error then its not showing me at that time this error massage, after the selecting the next three or four customer its showing error massage for the ...
0
votes
1
answer
35
views
Making a function inside an if statement run until you get a false value for the conditional using JS in Cypress
I am writing a test in Cypress where I enter two values into two separate inputs and then compare them by clicking a button. If the button displays "=", I need to reset and reenter two new ...
0
votes
2
answers
198
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 ...
0
votes
0
answers
10
views
can't running tester login with cypress
when I write a script like this the output results on cypress are not running "timed out retriying after 4000ms: expected to find element: a, but never found it"
describe('Login with inputs',...
-1
votes
2
answers
63
views
If condition fails and does not go in else block as using 'contains' [closed]
In the Material UI table there is one record which can exist or not.
The scenario is if that row is present based on 'Name' column then delete it, otherwise go to the else block and log that record is ...
0
votes
3
answers
192
views
I am facing a problem to verify element visibility if element in visible or not using cypress
When I try
cy.get('div.userId')
I want to add condition div.userId is exists/not in dom.
I am expecting not to fail test before checking existence of element in dom.
Like sometimes div.userId is not ...
-2
votes
1
answer
167
views
CSS property: display: none Cypress error - Cannot click Add buttons to add products to basket
I'm currently building a e2e regression test suit for an eCommerce website developed in Angular JS, I have written a loop and provided a condition in it, this is my code:
const productText =...
0
votes
0
answers
5
views
Can we handle multiple browser windows in cypress while Button is not having href?
Unable to handle multiple windows in cypress.
Steps:
Loading browser with url
Now click on button which will open new window. The button is not having href attribute.