Log
(Created page with "This command is a Flow Command. This command writes a message to a log file. '''Log:''' The message that is being logged. The log file for the log command ...") |
(→Example) |
||
Line 22: | Line 22: | ||
[[File:log.jpg]] | [[File:log.jpg]] | ||
+ | |||
+ | |||
+ | Opening the log file shows the following logs to show that the browser is on the correct webpage: | ||
+ | |||
+ | <pre>2015-02-15 13:19:34 [LOG] Webpage is Google.com</pre> | ||
+ | |||
+ | |||
+ | [[File:log0.jpg]] | ||
+ | |||
+ | |||
+ | Since the browser is not on the expected webpage and the correct element was not detected, the following message is logged on the second run: | ||
+ | |||
+ | |||
+ | <pre>2015-02-15 13:19:34 [LOG] Webpage is NOT Google.com</pre> |
Revision as of 16:30, 15 February 2015
This command is a Flow Command. This command writes a message to a log file.
Log: The message that is being logged.
The log file for the log command is located in your roaming folder found here: C:\Users\YOUR WINDOWS USERNAME HERE\AppData\Roaming\UBot Studio
The log folder can be located at: C:\Users\YOUR WINDOWS USERNAME HERE\AppData\Roaming\UBot Studio\Log
Dated log .txt log files are created to log each script:
Example
set(#page were on,$scrape attribute(<id="hplogo">,"alt"),"Global") log(#page were on)
Running the script will scrape the required element, which indicates the webpage the browser is on. Once the element is scraped, it is inserted into the log command through a variable and logged in the log file.
Opening the log file shows the following logs to show that the browser is on the correct webpage:
2015-02-15 13:19:34 [LOG] Webpage is Google.com
Since the browser is not on the expected webpage and the correct element was not detected, the following message is logged on the second run:
2015-02-15 13:19:34 [LOG] Webpage is NOT Google.com