Click Dialog Button

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
(7 intermediate revisions by one user not shown)
Line 2: Line 2:
 
Click Dialog Button is a [[Windows Commands|Windows Command]].
 
Click Dialog Button is a [[Windows Commands|Windows Command]].
  
* Caption refers to the label on the title bar of the dialog.
+
'''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.
+
 
 +
'''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|set dialog text command]] when uploading a file.
 
It is used along with the [[Set Dialog Text|set dialog text command]] when uploading a file.
Line 10: Line 11:
 
== Example ==
 
== Example ==
 
<pre>
 
<pre>
navigate("http://demo.swfupload.org/v220/simpledemo/index.php", "Wait")
+
navigate("https://angular-file-upload.appspot.com/","Wait")
 
wait(10)
 
wait(10)
click(<image="___IMAGE___0___IMAGE___">, "Left Click", "No")
+
click(<name="file">,"Left Click","Yes")
 
wait(10)
 
wait(10)
plugin command("WindowsCommands.dll", "set dialog text", "Select file(s) to upload by demo.swfupload.org", "File name:", "test.exe")
+
plugin command("WindowsCommands.dll", "set active window", "Open", "WindowsForms10.Window.0.app.0.1554b5c_r9_ad1")
 +
plugin command("WindowsCommands.dll", "set dialog text", "Open", "File name:", "blue.png")
 
wait(5)
 
wait(5)
plugin command("WindowsCommands.dll", "click dialog button", "Select file(s) to upload by demo.swfupload.org", "Save")
+
plugin command("WindowsCommands.dll", "click dialog button", "Open", "Open")
 +
 
 
</pre>
 
</pre>
  
The example script requires you to reselect the button "Hello" in the click command.
+
Please make sure to have a file available called "blue.png" or simply add a different file.
Running the script will set the label and caption of the dialog, and attempt to upload a file named "test.exe" under the part labeled Text in the set dialog text 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.  
  
  
[[File:clickdialogbutton.png]]
+
[[File:cdb.gif]]

Latest revision as of 21:12, 11 November 2017

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.


[edit] Example

navigate("https://angular-file-upload.appspot.com/","Wait")
wait(10)
click(<name="file">,"Left Click","Yes")
wait(10)
plugin command("WindowsCommands.dll", "set active window", "Open", "WindowsForms10.Window.0.app.0.1554b5c_r9_ad1")
plugin command("WindowsCommands.dll", "set dialog text", "Open", "File name:", "blue.png")
wait(5)
plugin command("WindowsCommands.dll", "click dialog button", "Open", "Open")

Please make sure to have a file available called "blue.png" or simply add a different file. 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.


Cdb.gif

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox