Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scenario("Статистика", function*(I) {
- I.waitAndClick(".logged_out .login");
- I.appendField("#auth_login", "ngadiyak@gmail.com");
- I.appendField('#auth_password', '11111661');
- I.waitAndClick(".auth_inner button[type='submit']");
- I.amOnPage("https://www.stoloto.ru/ruslotto/game?int=right&lastdraw");
- let pages = 0;
- let digits = [];
- let row1, row2, row3, row4, row5, row6;
- let numbers = [];
- for (let i = 0; i < 90; i++, digits[i] = 0);
- while (true) {
- I.waitAndClick('.refresh_btn');
- I.wait(2);
- console.log("CURRENT PAGE: " + ++pages);
- if (pages % 10 == 0) {
- for (let i = 1; i < 91; i++) {
- console.log(i + ": " + digits[i]);
- }
- }
- for (let i = 1; i <= 10; i++) {
- row1 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(2)");
- row2 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(3)");
- row3 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(4)");
- row4 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(6)");
- row5 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(8)");
- row6 = yield I.grabTextFrom(".front > :nth-child(" + i + ") tbody > :nth-child(9)");
- numbers = (row1 + ';' + row2 + ';' + row3 + ';' + row4 + ';' + row5 + ';' + row6).replace(/\s+/g, ";").split(';');
- for (let k = 0; k < numbers.length; k++) {
- if (Number(numbers[k]) > 0) {
- digits[Number(numbers[k])]++;
- }
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement