Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple selectbox isn't working #57

Open
bernhardh opened this issue Jul 25, 2023 · 1 comment
Open

Simple selectbox isn't working #57

bernhardh opened this issue Jul 25, 2023 · 1 comment

Comments

@bernhardh
Copy link

Cypress Chrome Recorder doesn't work with simple selectboxes. Instead of using the select method, it uses the type method.

image

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.

@nagash77
Copy link
Contributor

nagash77 commented Aug 4, 2023

Hi @bernhardh , thank you submitting this issue. Unfortunately this issue will not be high enough priority for us to address in the near future. If you (or others int he community) are able to submit a fix for this issue we would happily accept a PR addressing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants