Questions tagged [cypress-custom-commands]
111 questions
0
votes
0 answers
Trying to access IFrame body while login to gmail but Cypress is not able to find iframe content body
I'm trying to click Gmail tab in frame.
I'm trying to access iframe using cy.get("iframe[name='app']") as it doesn't have unique id or class.
And this iframe is visible but it's body is not accessable.
through automation we can see that body of…

Muneeb
- 67
- 1
- 7
0
votes
2 answers
Overwrite cypress commands to include a wait before they are run
I am trying to overwrite Cypress commands such as click, type and should to include some waiting time before they are executed. My motivation for this is that I want to highlight the areas the test interacts with in the produced video, so in click I…

Cola_Colin
- 415
- 5
- 16
0
votes
0 answers
Cypress - creating a custom command that includes a promise: how to typescript?
I have a custom iframe utility as cypress-iframe didn't work for me due to loading issues. This makes use of a promise. This code was taken from this gist here:…

plusheen
- 1,128
- 1
- 8
- 23
0
votes
0 answers
Cypress 10.11.0v parallel execution local
I am using cypress 10.11.0 and used "barrel" spec to run multiple imported specs and works fine for me.
Is there a way to run the specs in parallel way to get the results at the earlier. Or is there a way to run all specs at the same time but, with…
0
votes
3 answers
Cypress - Checking value property inside a div
I'm trying to check the value of the value field inside a div.
this value is not reflected to a string or a int in the div value, only in his attribute:

Omer Naim
- 1
- 1
0
votes
0 answers
sessionStorage.getItem is coming as null in cypress
I tried to set the session as in a custom command and called it in beforeall block
Cypress.Commands.add('cLogin', (win: any) => {
cy.request({
method: 'POST',
url: `loginAPIURL`,
body: {
…

ksk
- 165
- 14
0
votes
2 answers
Cypress xpath plugin does not work with cy.type()
I am unable to figure out why the cypress xpath is not working with the type(). I have two command functions: one that looks for the element using cy.get() and one that uses cy.xpath(). Unfortunately, this is a dynamic field so I have to use…

Eva
- 1
- 1
0
votes
0 answers
How do you auto populate state in cypress
I have a suite of cypress tests for an online application. Some of my tests only tests what is on the final page of the application or decision pages and hence do not want to always fill the initial pages each time I run these tests. I am hence…

favored
- 83
- 5
0
votes
0 answers
Can we call POM from cypress custom command
I was wondering if we could call a page object model from a cypress custom commands. If this can happen then it could make cypress automated test more powerful

Mcr
- 13
- 5
0
votes
1 answer
Read Property Values in Cypress_Json File
I am trying to reach out to the "testdata":"two" property values [like 'EH']. While I was taking that property, I am facing "Cannot read property" this issue, How I fix this issue in Cypress?
[{
"testdata": "one",
"TC": {
…

Elango Mano
- 1
- 1
0
votes
0 answers
Cypress test do not run using Jenkins but run fine from command line. Throws Failed to construct 'URL': Invalid URL Error
We run our E2E tests against Chrome 70 on windows machine in headed mode using command npm install && cypress run --browser chrome --headed "--config" "baseUrl=http:serveraddress:8080" "--env" "Host=serveraddress". The tests connect to a server url…

NG576
- 21
- 2
0
votes
0 answers
Getting error with Toaster form using cypress end 2 end
I am new in the use of cypress, which makes me face concern.
I would like to automate actions in order to test some Progressive Web App (PWA) and so I have recorded actions using the cypress extension of google chrome and when I create specs in…

ss10
- 69
- 6
0
votes
1 answer
How can I get my cypress custom command to ingest this data (i think i structured the data wrong)?
Alright, as the title says- i'm trying to write a custom command for a cypress test suite. The situation as as follows: I have several tests that need to select an indeterminate number of fields and select an option from the each fields list of drop…

kev
- 225
- 1
- 2
- 9
0
votes
1 answer
find Current running cypress command in cypress config
is there any way to find the Current running cypress command when it reaches the first time to the cypress config.ts file?
actually, I need to do something based on the command used by a user
example
if the cypress command is executed to run…

ksk
- 165
- 14
0
votes
1 answer
Cypress giving error "WebSocket is closed before the connection is established"
When i visit baseURL, it will navigate to keycloak login, after entering login details, then it will navigate to production URL.
So, I'm navigating back to baseURL. At that time, it will throw below error in
console. Hence Page is keep on…

Hoks Vishu
- 63
- 4