Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let current = await page.$eval('body',(el) => el.querySelector('td[data-handler="selectDay"]'));
- while (current) {
- console.log(current)
- console.log(current.toString())
- if (current && current.toString().includes('a.ui-state-default')) {
- // @ts-ignore
- // await page.evaluate((current: HTMLElement) => current.click(), current);
- await current.click()
- await page.waitForTimeout(2000)
- const atividade = await page.$('#cmbActividades');
- // @ts-ignore
- await atividade.select('840616');
- const horas = await page.$('#HorasCapturadas');
- // @ts-ignore
- await horas.select('8')
- await page.click('#btnOk')
- await page.waitForTimeout(5000)
- console.log('CLICOUUUUUUUUUUUUUUUUUUU')
- }
- current = (current) ? current.nextElementSibling as HTMLElement : null
- };
Add Comment
Please, Sign In to add comment