Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. (async () => {
  2. let nightmare;
  3. try {
  4. nightmare = Nightmare({ show: true });
  5. let a = nightmare.goto('http://127.0.0.1:8000')
  6. .wait()
  7. .type('#inputEmail', '222@mail.ru')
  8. .type('#inputPassword', '123456')
  9. .click('#button_c')
  10. .wait(3000)
  11. .goto('http://127.0.0.1:8000/q/7')
  12. .wait(3000)
  13. items.forEach((item) => {
  14. a.type('#answer_answer', '').type('#answer_answer', item['id']).click('#next_b').wait(3000);
  15. })
  16.  
  17. } catch (error) {
  18. console.error(error);
  19. throw error;
  20. } finally {
  21. await nightmare.end();
  22. }
  23. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement