Click Dialog Button
From UBot Studio
(Difference between revisions)
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<pre> | <pre> | ||
− | navigate("http:// | + | navigate("http://www.wicket-library.com/wicket-examples/upload/single;jsessionid=1FEA50780DF098B72607FABE888AD545?0", "Wait") |
wait(10) | wait(10) | ||
− | click(< | + | click($element offset(<name="fileInput">, 0), "Left Click", "No") |
wait(10) | wait(10) | ||
− | plugin command("WindowsCommands.dll", "set dialog text", " | + | plugin command("WindowsCommands.dll", "set dialog text", "Open", "File name:", "blue.png") |
wait(5) | wait(5) | ||
− | plugin command("WindowsCommands.dll", "click dialog button", " | + | plugin command("WindowsCommands.dll", "click dialog button", "Open", "Open") |
+ | |||
</pre> | </pre> | ||
− | The example script requires you to | + | The example script requires you to re-select the button "Hello" in the click command. |
− | Running the script will set the label and caption of the dialog, and attempt to upload a file named " | + | Running the script will set the label and caption of the dialog, and attempt to upload a file named "blue.png" under the part labeled Text in the set dialog text command. |
− | [[File: | + | [[File:cdb.png]] |
Revision as of 15:21, 30 September 2014
This command clicks Cancel or Save on a save as or open file dialog. Click Dialog Button is a Windows Command.
Caption: refers to the label on the title bar of the dialog.
Button Text: refers to the text on the button on the dialog that should be clicked.
It is used along with the set dialog text command when uploading a file.
Example
navigate("http://www.wicket-library.com/wicket-examples/upload/single;jsessionid=1FEA50780DF098B72607FABE888AD545?0", "Wait") wait(10) click($element offset(<name="fileInput">, 0), "Left Click", "No") wait(10) plugin command("WindowsCommands.dll", "set dialog text", "Open", "File name:", "blue.png") wait(5) plugin command("WindowsCommands.dll", "click dialog button", "Open", "Open")
The example script requires you to re-select the button "Hello" in the click command.
Running the script will set the label and caption of the dialog, and attempt to upload a file named "blue.png" under the part labeled Text in the set dialog text command.