- Регистрация
- 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".
Next, in ProjectMaker, click on the search, insert ID and find the step, and already understand why all this is so.
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:
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
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)
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
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.
As a result, your logs will look like this:
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!
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".
Next, in ProjectMaker, click on the search, insert ID and find the step, and already understand why all this is so.
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:
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
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)
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
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.
As a result, your logs will look like this:
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!
Вложения
-
37,9 КБ Просмотры: 516
Последнее редактирование: