Errors in the templates?! Find and solve them 2 times faster !!!

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113
A competently asked question, this is half the answer.
And in a ZennoPoster well-structured error log, this is half the solution.


On this simple example, which you can easily use, in your templates, I will demonstrate this.
You won't regret if you understand!

First, you need to learn that every step in the template has a unique ID, by which it can be identified and found in ProjectMaker.

In order to get the step id with an error, it is necessary in the ZennoPoster logs, right click on the error and click "copy id".
q1.png


Next, in ProjectMaker, click on the search, insert ID and find the step, and already understand why all this is so.
q2-1.png


But until you copy the id and find it in ProjectMaker, it's unclear where the error occurred, it's also unclear how many such errors, and how many others. To engage in a depressing copy-paste from the logs, this is a solution for freaks. I hope you are not that, my reader. Tasks need to be solved elegantly and simply)

I offer you the following solution:
q3-1.png

As you can see, the screen uses a big red circle badEnd.
But he does't have a single input arrow. Because the template itself automatically runs execution to badEnd if an error occurred during execution.

To catch a bug and that it was visually displayed I do the following:
1. Get tickCount, this is a unique value of numbers. This is so that the elements and logs that we get below are merged for each thread, but also unique, so that the file names do not coincide with the names that the other threads will save.
2. Get the error ID inside the template
q4.png

Much and all the basics are available in ZP without the knowledge of programming languages, but in some situations, they can't be dispensed with. Just use this code to get the step ID in which the error is.
3. Using CaptchaSaver, we will make an instance screen. It works like a captcha detection module, only we indicate the tag we want to save like image, in our case the entire visible part is the BODY tag (Who does not know why BODY, learn the basics of html.) The BODY tag have entire visible part of the page)
q5-1.png

And in the "additional" tab, we specify the path and name of the received screenshot to save the screenshot. In our case this is:
{-Project.Directory-}error \{- Variable.Log_Error -}-{- Variable.tickID -}.jpg
Project directory\error\received in step2-unique tick ID.jpg

q6-1.png

4. Save the source code of page.
5. Save the DOM of page.
6. This C# code gets the name and value of all the variables used in the template.
7. Save all these variables to a file.
q7.png


As a result, your logs will look like this:
q8.png

ga-2225 is an example of error id, you can have many and different ones, but using to tickCount various files of the same error will be grouped!

And using to the screenshot you will visually see the error, and thanks to the source code and DOM of the page, you will know in what state the page code was at the time of the error.

Edit errors will be easy and simple!

To use the template, just copy this column with the steps to your project and connect it to BadEnd.
And you will understand how obvious and understandable are the mistakes!
 

Вложения

Последнее редактирование:

krisztos

Client
Регистрация
28.06.2014
Сообщения
175
Благодарностей
8
Баллы
18
Very nice tutorial, the only thing I wonder how to easily locate that "error id" in project maker - which block it is.
 

sMax

Client
Регистрация
04.05.2011
Сообщения
132
Благодарностей
49
Баллы
28
Great share.

Very nice tutorial, the only thing I wonder how to easily locate that "error id" in project maker - which block it is.
The partial name of the files up to the 2 dashes is the Action Id. It is also in the variables file as "Name: Log_Error Value:" , easy as pie.
Just click on the "magnifying glass" in the advanced editor, paste the Action Id in it, press enter and it takes you to the block.

To quote the OP:
As a result, your logs will look like this:
Посмотреть вложение 19406
ga-2225 is an example of error id, you can have many and different ones, but using to tickCount various files of the same error will be grouped!
Great share!

PS. what the op calls the Error Id is actually the Action Id (of the block)
 
Последнее редактирование:
  • Спасибо
Реакции: LightWood

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113
Great share.



The partial name of the files up to the 2 dashes is the Action Id. It is also in the variables file as "Name: Log_Error Value:" , easy as pie.
Just click on the "magnifying glass" in the advanced editor, paste the Action Id in it, press enter and it takes you to the block.

To quote the OP:


Great share!

PS. what the op calls the Error Id is actually the Action Id (of the block)
Thanks. Good answer.
 
Регистрация
10.07.2017
Сообщения
29
Благодарностей
1
Баллы
3
Nice share. Thanks for that.
 

adminx

Client
Регистрация
24.03.2018
Сообщения
23
Благодарностей
4
Баллы
3
thank
 
  • Спасибо
Реакции: LightWood

spyder

Client
Регистрация
19.10.2014
Сообщения
27
Благодарностей
1
Баллы
3
it is helpful. thank you
 
  • Спасибо
Реакции: LightWood

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
916
Баллы
113

PBIT

Новичок
Регистрация
27.07.2015
Сообщения
6
Благодарностей
0
Баллы
1
A competently asked question, this is half the answer.
And in a ZennoPoster well-structured error log, this is half the solution.


On this simple example, which you can easily use, in your templates, I will demonstrate this.
You won't regret if you understand!

First, you need to learn that every step in the template has a unique ID, by which it can be identified and found in ProjectMaker.

In order to get the step id with an error, it is necessary in the ZennoPoster logs, right click on the error and click "copy id".
Посмотреть вложение 19399

Next, in ProjectMaker, click on the search, insert ID and find the step, and already understand why all this is so.
Посмотреть вложение 19400

But until you copy the id and find it in ProjectMaker, it's unclear where the error occurred, it's also unclear how many such errors, and how many others. To engage in a depressing copy-paste from the logs, this is a solution for freaks. I hope you are not that, my reader. Tasks need to be solved elegantly and simply)

I offer you the following solution:
Посмотреть вложение 19401
As you can see, the screen uses a big red circle badEnd.
But he does't have a single input arrow. Because the template itself automatically runs execution to badEnd if an error occurred during execution.

To catch a bug and that it was visually displayed I do the following:
1. Get tickCount, this is a unique value of numbers. This is so that the elements and logs that we get below are merged for each thread, but also unique, so that the file names do not coincide with the names that the other threads will save.
2. Get the error ID inside the template
Посмотреть вложение 19402
Much and all the basics are available in ZP without the knowledge of programming languages, but in some situations, they can't be dispensed with. Just use this code to get the step ID in which the error is.
3. Using CaptchaSaver, we will make an instance screen. It works like a captcha detection module, only we indicate the tag we want to save like image, in our case the entire visible part is the BODY tag (Who does not know why BODY, learn the basics of html.) The BODY tag have entire visible part of the page)
Посмотреть вложение 19403
And in the "additional" tab, we specify the path and name of the received screenshot to save the screenshot. In our case this is:
{-Project.Directory-}error \{- Variable.Log_Error -}-{- Variable.tickID -}.jpg
Project directory\error\received in step2-unique tick ID.jpg

Посмотреть вложение 19404
4. Save the source code of page.
5. Save the DOM of page.
6. This C# code gets the name and value of all the variables used in the template.
7. Save all these variables to a file.
Посмотреть вложение 19405

As a result, your logs will look like this:
Посмотреть вложение 19406
ga-2225 is an example of error id, you can have many and different ones, but using to tickCount various files of the same error will be grouped!

And using to the screenshot you will visually see the error, and thanks to the source code and DOM of the page, you will know in what state the page code was at the time of the error.

Edit errors will be easy and simple!

To use the template, just copy this column with the steps to your project and connect it to BadEnd.
And you will understand how obvious and understandable are the mistakes!

Where do I find Zennoposter logs in project maker?
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)