-
Notifications
You must be signed in to change notification settings - Fork 1
/
1294.js
28 lines (23 loc) · 811 Bytes
/
1294.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const Nightmare = require('nightmare')
main().catch(console.error)
async function main() {
const nightmare = Nightmare({ show: true })
const el = await nightmare
.goto('https://www.jucesponline.sp.gov.br/BuscaAvancada.aspx')
.type(
'#ctl00_cphContent_frmBuscaAvancada_txtDataAberturaInicio',
'10/10/2017'
)
.type('#ctl00_cphContent_frmBuscaAvancada_txtDataAberturaFim', '10/10/2017')
.select('#ctl00_cphContent_frmBuscaAvancada_ddlTipoEmpresa', 21)
.click('#ctl00_cphContent_frmBuscaAvancada_btPesquisar')
.wait(2000)
.wait('#ctl00_cphContent_gdvResultadoBusca_gdvContent')
.evaluate(() => {
return document.getElementById(
'ctl00_cphContent_gdvResultadoBusca_gdvContent'
).nodeName
})
console.log(el)
await nightmare.end()
}