-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Cypress Chrome Recorder doesn't work with simple selectboxes. Instead of using the select method, it uses the type method.
I have made just a very simple testpage, with an selectbox in it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>HTML 5 Boilerplate</title>
</head>
<body>
<select id="select">
<option></option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
</select>
</body>
</html>Then I created a recording where i selected some options and exported it to cypress:
describe("Selectbox", () => {
it("tests Selectbox", () => {
cy.viewport(1151, 1329);
cy.visit("https://webcaravel.at/select.html");
cy.get("#select").type("Option 1");
cy.get("html").click();
cy.get("#select").type("Option 3");
});
});When I run this test, the selectbox doesn't change the option at all.
Metadata
Metadata
Assignees
Labels
No labels
