How do I right click on a multi-sheet workbook and insert/delete using Cypress?

Posted by: sadiq.rahim on 30 October 2023, 1:58 am EST

    • Post Options:
    • Link

    Posted 30 October 2023, 1:58 am EST

    Currently, when I click on a sheet name on the spreadsheet and right click, I’m able to see the option to hide/delete/insert.

    Steps of the delete feature

    1. Click on the sheet name
    2. Right click
    3. Select the option to delete a sheet

    I want to be able to use this flow to test the features of hiding, deleting or inserting a sheet using Cypress. Do you have a sample to show how this can be achieved on Cypress tests?

  • Posted 30 October 2023, 10:50 pm EST

    Hi,

    Please refer to the attached sample.

    In the attached cypress sample, there are test cases for hiding, deleting, and inserting sheet in the spread(Workbook) instance.

    When the test cases start, they find the position of active sheet tab and perform right click on the active sheet tab to open the sheet context menu and select the insert, delete, and hide options respectively.

    Please run commands “npm i” to install dependencies, “npm start” to run the sample and “npm run cy:run” to run the tests on the sample that is running.

    sample: cypress.zip

    Also, I can see at my end that you have also posted the same query on the ticket CAS-44715-R5S2T3. Please note that it is always recommended to post a query either at the forum or our customer portal. Please do not post it in both places. It would help us to better manage queries and provide solutions more efficiently.

    Regards,

    Chandan

  • Posted 31 October 2023, 11:18 pm EST

    Hi Chandan,

    Appreciate for coming back to me promptly with a working example, which helped. My bad for posting it on both places, duly noted. Think I lost the page as I was filling it up on one of them but never went back to looking for it and cancel/delete, which was my bad.

    Thanks

    Sadiq

  • Posted 1 November 2023, 2:24 pm EST

    Hi Sadiq,

    We are glad that the sample provided was helpful to you and helped you to resolve the issue you were facing. We also appreciate your understanding regarding the posting of queries.

    If you face any issues, please let us know.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels