Code View

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
  
 
To switch to code view, simply click the Code View Button on top of the scripting window.
 
To switch to code view, simply click the Code View Button on top of the scripting window.
 +
  
 
[[File:cdeview.jpg]]
 
[[File:cdeview.jpg]]
 +
  
 
Once clicked, each node in your scripting window changes to text versions of uscript.
 
Once clicked, each node in your scripting window changes to text versions of uscript.
  
 
For example, the navigate command node in Code View is written as the following:
 
For example, the navigate command node in Code View is written as the following:
 +
  
 
<pre>navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")</pre>
 
<pre>navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")</pre>
Line 32: Line 35:
  
 
The Code View window will spot and highlight the issue within the script. It will provide the line number where the issue is located.
 
The Code View window will spot and highlight the issue within the script. It will provide the line number where the issue is located.
 +
  
 
[[File:condeview0.jpg]]
 
[[File:condeview0.jpg]]
Line 37: Line 41:
  
 
Clicking the Node View button before the error is fixed will result in this message:
 
Clicking the Node View button before the error is fixed will result in this message:
 +
  
 
[[File:codeview1.jpg]]
 
[[File:codeview1.jpg]]
 +
  
 
The error must be fixed before switching back to Node View.
 
The error must be fixed before switching back to Node View.

Revision as of 19:52, 14 July 2013

Code View is a feature found in the Professional and Developer editions of UBot Studio.

The feature allows you to type out your commands and functions instead of dragging and dropping.

This allows for faster scripting and easier editing of code withing your script.

To switch to code view, simply click the Code View Button on top of the scripting window.


File:Cdeview.jpg


Once clicked, each node in your scripting window changes to text versions of uscript.

For example, the navigate command node in Code View is written as the following:


navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")


Handling Scripting Errors Within the Script

The Code View features comes ready to handle any typos in your script that might prevent the rest of your script from working appropriately.

For example, this script has a type in the type text command. Can you spot the error?

navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
type text(<username field>, "aspiedargie123", "Standard")
type text(<password field>, "jonaex533%", "Standard")
type text(<first name field>, "May", "Standard")
type text(<last name field>, Darth", "Standard")

The issue is a subtle one. The value "Darth" for the last name field is missing a quotation mark.

The Code View window will spot and highlight the issue within the script. It will provide the line number where the issue is located.


File:Condeview0.jpg


Clicking the Node View button before the error is fixed will result in this message:


File:Codeview1.jpg


The error must be fixed before switching back to Node View.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox