Open
Description
In the latest version (0.22.0), getting a button value is not possible with the .val()
function.
import * as cheerio from "cheerio";
let ch = cheerio.load(`<form><button value="something">I'm a button</button></form>`);
console.log(ch('button').val());
console.log(ch('button').attr('value'));
The code snippet above will return:
undefined
something
To match jQuery behavior, it should return:
something
something