Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const response = await page.goto(url);
- const status = response.status();
- console.log(status);
- if (status == 200) {
- const headers = response.headers();
- console.log(headers);
- const TextFindX = await page.$x(`//*[text()='${TextFind}']`);
- if (TextFindX.length > 0) {
- console.log('Tekst znaleziony');
- } else {
- console.log('Tekst NIE znaleziony');
- }
- } else {
- console.log(`Error HTTP: ${status}`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement