I am building a scraper in node, but I have gotten stumped. I go to this address: https://ariisp1.oklahomacounty.org/AssessorWP5/DefaultSearch.asp and I want to simulate putting an address in the second textbox and clicking the subsequent 'Submit' button. I can successfully find the textbox and the following button, but I cannot figure out how to simulate the 'click' function and retrieve the url it goes to. There is no href associated with the button because the url it goes to is determined by the address that is put in. Any ideas?
var request = require('request');
var cheerio = require('cheerio');
request.post('https://ariisp1.oklahomacounty.org/AssessorWP5/DefaultSearch.asp', /*{
form: {
FormattedLocation: '2333 Nw 32 St'
//btnSubmit: 'Submit'
}
}, */
function (err, res, body) {
let $ = cheerio.load(body);
$("input[name=FormattedLocation]").text('2331 nw 32 st');
var x = $("input[name=FormattedLocation]").text();
var y = $("input[name=FormattedLocation]").next().attr('type');
console.log(y);//successfully gets the 'Submit' button
//code to click button and get the page it goes to goes here
})