thousands-house-85089
01/17/2023, 11:40 AMlively-balloon-98986
01/17/2023, 11:41 AMlively-balloon-98986
01/17/2023, 11:42 AMthousands-house-85089
01/17/2023, 11:42 AMlively-balloon-98986
01/17/2023, 11:43 AMthousands-house-85089
01/17/2023, 11:44 AMlively-balloon-98986
01/17/2023, 11:45 AMthousands-house-85089
01/17/2023, 11:45 AMlively-balloon-98986
01/17/2023, 11:46 AMthousands-house-85089
01/17/2023, 11:46 AMpurple-afternoon-2408
01/17/2023, 12:02 PMshould
with click
? based on the docs, I should use then
(https://docs.cypress.io/api/commands/should#Whats-the-difference-between-then-and-shouldand), so it's not working, I tried:
.should('not.have.attr', 'disabled')
.then(($el) => {
cy.wrap($el).click(); // also tried without the cy.wrap(), by using $el.click(); directly
});
and:
.should('not.have.attr', 'disabled').then().click();
purple-afternoon-2408
01/17/2023, 12:06 PMthousands-house-85089
01/17/2023, 12:24 PMjs
cy.get('#purchase_quantity')
.contains("1")
.then(() => {
cy.get('#purchase_quantity')
.select("6");
})
purple-afternoon-2408
01/17/2023, 12:25 PMshould
and click
thousands-house-85089
01/17/2023, 12:26 PMthousands-house-85089
01/17/2023, 12:26 PMpurple-afternoon-2408
01/17/2023, 12:26 PMget
thousands-house-85089
01/17/2023, 12:26 PMthousands-house-85089
01/17/2023, 12:26 PMpurple-afternoon-2408
01/17/2023, 12:27 PMthen
?
I am currently doing:
.should('not.have.attr', 'disabled');
cy.get('...').click();
purple-afternoon-2408
01/17/2023, 12:27 PMthousands-house-85089
01/17/2023, 12:27 PMthousands-house-85089
01/17/2023, 12:28 PMpurple-afternoon-2408
01/17/2023, 12:28 PMthousands-house-85089
01/17/2023, 12:28 PMthousands-house-85089
01/17/2023, 12:29 PMthousands-house-85089
01/17/2023, 12:30 PMthousands-house-85089
01/17/2023, 12:31 PMjs
cy.get('.edit-delivery-options')
.should('contain', "Mainland UK")
.click()
thousands-house-85089
01/17/2023, 12:32 PMpurple-afternoon-2408
01/17/2023, 12:32 PM