https://cypress.io logo
```assignValuesToSelectedSettings() { cy.g...
# general-chat
b
Copy code
assignValuesToSelectedSettings() {
        cy.get('[name="selected-settings"]').find('select').each((select) => {
            if (select.is(':visible')) {
                cy.wrap(select).scrollIntoView({ ensureScrollable: false })
                cy.wrap(select).find('option').filter(':enabled').its('length').then((optionsLength) => {
                    const random_option = Math.floor(Math.random() * optionsLength);
                    cy.wrap(select).select(random_option).scrollTo(0, 200, { ensureScrollable: false })
                })
            } else { }

        })

    }
6 Views