Change Attribute

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
This command is part of the [[Browser Commands|Browser Command]]. This command allows the changing of any attribute on an html element.
 
This command is part of the [[Browser Commands|Browser Command]]. This command allows the changing of any attribute on an html element.
 +
 
This comes in handy when you need to change the value of a field or a drop down menu.
 
This comes in handy when you need to change the value of a field or a drop down menu.
 +
 +
An element is chosen using one of the selector tools. (See [[The Selectors]] for more information)
 +
 +
'''Element to Change:''' The element on the page selected for changing. (such as a text field)
 +
 +
'''Attribute to Change:''' The attribute of the selected element that is being changed (such as the value)
 +
 +
'''New Attribute Value:''' The new
  
 
== Example ==
 
== Example ==

Revision as of 19:46, 23 April 2013

This command is part of the Browser Command. This command allows the changing of any attribute on an html element.

This comes in handy when you need to change the value of a field or a drop down menu.

An element is chosen using one of the selector tools. (See The Selectors for more information)

Element to Change: The element on the page selected for changing. (such as a text field)

Attribute to Change: The attribute of the selected element that is being changed (such as the value)

New Attribute Value: The new

Example

navigate("http://ubotstudio.com/playground/simple-form", "Wait")
wait(5)
change attribute(<username field>, "value", "myusername")

File:Changeattribute.png

Running the script will change the value of the field to the value "myusername". Changing the value of this field is the same as filling the field. Whatever is inside the field determines the field's value.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox