Skip to content

Instantly share code, notes, and snippets.

@patrick-made
patrick-made / mui-select-puppeteer.jsx
Last active August 25, 2023 07:04
Puppeteer MUI Material Select Programatically Select Option
// struggled to figure this out, hopefully this helps you!
// component
import { Select, MenuItem, FormControl } from '@material-ui/core'
const SelectRamen = () => (
<FormControl id="select-ramen">
<InputLabel>Pick Your Ramen</InputLabel>
<Select>
{options.map((opt, i) => <MenuItem key={i} value={opt}>{opt.name}</MenuItem>)}