https://cypress.io logo
Join Discord
Powered by
# help
  • b

    bitter-fountain-36713

    09/20/2022, 3:51 PM
    .get()
    needs to be chained off a command that yields a DOM element, not
    .visit()
  • l

    lively-gigabyte-29944

    09/20/2022, 5:25 PM
    Hi again! Just wondering if anyone could please help me out with this? Thanks 🙂
  • w

    worried-lifeguard-15953

    09/20/2022, 8:02 PM
    Is there any way to have cypress generate a report of the hierarchical describe/context/it blocks? Basically, I'd like this in some kind of file or text format that I can give to our testing group (even though we have cypress, management also likes actual users to test more common day-to-day workflow).
  • f

    faint-petabyte-53311

    09/20/2022, 9:08 PM
    Hello - anyone here able to help debug cypress interaction with browser cookies? I am stumped - for some reason, the very first request my browser makes to my server already includes an old session id, even though cypress docs indicate that cookies are cleared (and I manually added cookie clearing to the test, just in case). This is causing test failures and I'm not sure what's happening. Later on in my tests, I actually deliberately set a different session id, and cypress uses it for exactly one request, then goes back to the cookie that was first generated when the test was started, which causes all subsequent tests to fail.
  • l

    lemon-room-79571

    09/20/2022, 9:57 PM
    Hi, can anyone help me with adobe analytics testing with cypress 10 please? Any sample code ?
  • g

    gorgeous-terabyte-32196

    09/20/2022, 10:51 PM
    Hi Can anybody help me. I was able to click the ul element form a tree view element but not anymore. The tests have stopped clicking on the element all of a sudden.
  • i

    icy-exabyte-68383

    09/20/2022, 10:54 PM
    I have a and some levels under it a . the salutationfield is perfectly fitted with locator, the input changes everything everytime. how can i do something like cy.get(salutationfield.input)?
  • s

    silly-laptop-48411

    09/20/2022, 11:47 PM
    Yep good pick up. Still though, the test will always pass when asserting something doesn't exist unless I query another element which should exist, therefore ensuring the page has loaded. Just feels a little odd and wanting to confirm this is the right approach
  • b

    bitter-fountain-36713

    09/21/2022, 3:08 AM
    What exactly are you trying to check with your 'thing' should not exist?
  • c

    crooked-article-24217

    09/21/2022, 6:25 AM
    Hi All, I am trying to connect cypress v10 to a SQL server - has anyone done this before? If so I would really appreciate some help please
  • b

    bored-school-78265

    09/21/2022, 8:05 AM
    Take a look at Reporters (https://docs.cypress.io/guides/tooling/reporters#Reporter-Options)
  • b

    bored-school-78265

    09/21/2022, 8:11 AM
    What happens? If you select the "click" command in the command list it should print the actual element that was clicked to the console. If there was no element or it was the wrong one then check your selector.
  • b

    bored-school-78265

    09/21/2022, 8:15 AM
    You probably want to use find (https://docs.cypress.io/api/commands/find). As in:
    Copy code
    cy.get(salutationfield).find(input)
  • b

    bored-school-78265

    09/21/2022, 8:19 AM
    What exactly are you trying to check
  • b

    bored-school-78265

    09/21/2022, 8:25 AM
    What do you mean by connecting Cypress to SQL Server? Do you mean save the test results into SQL or are you trying to test SQL Server with Cypress?
  • c

    crooked-article-24217

    09/21/2022, 8:55 AM
    Hi, I'm trying to query a table to find out if a record exists
  • b

    bored-school-78265

    09/21/2022, 8:57 AM
    Cypress is the wrong tool for that. It is for front end testing, i.e. things that run in the browser.
  • b

    bored-school-78265

    09/21/2022, 9:01 AM
    Oh I think I know what you might be trying to do. You want to do something to the UI then make sure it gets saved to the database? That is kind of the wrong way of thinking about it. Think of what it means for the user to have something saved in the database. What it really means is that when you reload the page then that state persists.
  • c

    crooked-article-24217

    09/21/2022, 9:08 AM
    So What I'm trying to do is, if a record exists in the DB then the test needs to do something particular or if it does not exist then create it
  • b

    bored-school-78265

    09/21/2022, 9:15 AM
    Well you can call some HTTP or WebSocket API to do some setup if that's what you mean.
  • m

    mysterious-belgium-25713

    09/21/2022, 9:20 AM
    Hi @crooked-article-24217 so yesterday I helped 2 peoples with database calling with Cypress. If you want to call databases you need to use a cypress task. Tasks let you use nodejs libraries that are ment for backend features. What kind of sql db are u using
  • m

    mysterious-belgium-25713

    09/21/2022, 9:21 AM
    @crooked-article-24217 if you have postgres then look at this example https://discord.com/channels/755913899261296641/1021507971861200918/1021780811680321648
  • m

    mysterious-belgium-25713

    09/21/2022, 9:22 AM
    @bored-school-78265 , you can use cypress for more then only front end testing. The tool is also used for API testing or utilizing the tasks to seed database before your testing starts. So I don't believe it's wrong to call a database to check a value and if it does not exist add it to the database.
  • c

    crooked-article-24217

    09/21/2022, 9:26 AM
    Hi Xavier I'm connecting to a sql server via the IP address
  • m

    mysterious-belgium-25713

    09/21/2022, 9:27 AM
    Is it a MySQL, postgresql or Oracledb. You really need to know which database it is so you use the right tool to connect to it
  • c

    crooked-article-24217

    09/21/2022, 9:28 AM
    SQL Server
  • m

    mysterious-belgium-25713

    09/21/2022, 9:29 AM
    Microsoft SQL Server ?
  • c

    crooked-article-24217

    09/21/2022, 9:29 AM
    Yeah
  • m

    mysterious-belgium-25713

    09/21/2022, 9:32 AM
    Yesterday @careful-insurance-62240 posted a blogpost of him connecting to azure sql so maybe the guide also works for Microsoft SQL server. https://qaautomationlabs.com/how-to-setup-and-run-cypress-test-cases-in-azure-devops-pipeline-2/
  • m

    mysterious-belgium-25713

    09/21/2022, 9:32 AM
    @crooked-article-24217 hope this blog helps you
1...149150151...252Latest