Reputation: 45
I am testing a form submit with Cypress. My Form action is the same has the current page URL. Once I hit submit it downloads a file. I am facing two issues:
cy.get(urSelector.UserActivityReportForm) .then(() => { util.clearAndSendKeys(urSelector.FromCalendar, urData.From) util.clearAndSendKeys(urSelector.ToCalendar, urData.To) util.clearAndSendKeys( urSelector.SearchByCategoryTxtBox, urData.Category ) util.clickSearchButton() }) .then(() => { cy.get(urSelector.DownloadUserReportForm).submit() })
Upvotes: 0
Views: 420
Reputation: 11
If you have to click a button submit, you can try to find the correct name with the Open Selector Playground,then: cy.get('insert yours button').contains('text of yours button').click({force:true})
Upvotes: 1