Reputation: 331
I am trying to click a button that links to new tab in order to continue testing the journey. I know cypress doesn't support multi-tab so I am hoping there is a way to open it in the same tab. The problem is the button doesn't use an <a>
tag and seems to be dynamically generating the link. Code below...
<button _ngcontent-c14="" aria-label="download-data" class="download-button btn btn-default col-sm-3" value="download data" id="search-download-button-0-08062604-94b4-432c-8f36-19bb2757cadf"></button>
I cannot remove the target attribute because there isn't one. Apologies if I missed any details, this is my first post and i am relatively new to Cypress
Upvotes: 2
Views: 918
Reputation: 106
As specified in Cypress documentation "Because Cypress runs in the browser, it will never have multi-tabs support."
https://docs.cypress.io/guides/references/trade-offs.html#Multiple-tabs
Also there are other Possible solutions suggested at below:
To solve this problem, break the test cases into smaller step:
Upvotes: 2