The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "CLICK"
Line 1: | Line 1: | ||
"Clicks" on the '''HTML element''' at the specified X/Y coordinates. The zero position (origin) of the coordinate system is in the top left corner of the webpage. The x axis is positive to the right, the y axis is positive downwards. The optional CONTENT attribute can be used to send text to the clicked element (e.g. if the clicked element is an input box). | "Clicks" on the '''HTML element''' at the specified X/Y coordinates. The zero position (origin) of the coordinate system is in the top left corner of the webpage. The x axis is positive to the right, the y axis is positive downwards. The optional CONTENT attribute can be used to send text to the clicked element (e.g. if the clicked element is an input box). | ||
− | To record a CLICK command set the '''ClickMode''' to "Use X/Y position" during [[First_Steps# | + | To record a CLICK command set the '''ClickMode''' to "Use X/Y position" during [[First_Steps#What's a Click Mode?|recording]]. |
Note: ''This CLICK command must not be confused with the [[DS|DS CMD=CLICK]] command'', which is designed to work with Flash, Silverlight (etc.) applets, but, of course, also works with HTML. But in contrast to [[DS|DS CMD=CLICK]], CLICK can click on elements of a page although they are not currently displayed in the browser window, i.e. this command does not need scrolling. In addition, the CLICK command can be run in background mode. | Note: ''This CLICK command must not be confused with the [[DS|DS CMD=CLICK]] command'', which is designed to work with Flash, Silverlight (etc.) applets, but, of course, also works with HTML. But in contrast to [[DS|DS CMD=CLICK]], CLICK can click on elements of a page although they are not currently displayed in the browser window, i.e. this command does not need scrolling. In addition, the CLICK command can be run in background mode. |
Revision as of 16:26, 16 December 2010
"Clicks" on the HTML element at the specified X/Y coordinates. The zero position (origin) of the coordinate system is in the top left corner of the webpage. The x axis is positive to the right, the y axis is positive downwards. The optional CONTENT attribute can be used to send text to the clicked element (e.g. if the clicked element is an input box).
To record a CLICK command set the ClickMode to "Use X/Y position" during recording.
Note: This CLICK command must not be confused with the DS CMD=CLICK command, which is designed to work with Flash, Silverlight (etc.) applets, but, of course, also works with HTML. But in contrast to DS CMD=CLICK, CLICK can click on elements of a page although they are not currently displayed in the browser window, i.e. this command does not need scrolling. In addition, the CLICK command can be run in background mode.
Syntax
CLICK X=n Y=m [CONTENT=some_content]
Parameters
- X
Specifies the x (horizontal) coordinate of the website element that is to be clicked.
- Y
Specifies the y (vertical) coordinate of the website element that is to be clicked.
- CONTENT
Specifies the value that is sent to the clicked element. (Replace blank spaces by <SP>, like in "Hello<SP>world")
Examples
The following example illustrates that the CLICK command can, in contrast to the WINCLICK command, "click" website elements that are not currently displayed in the browser window:
' open a iOpus homepage URL GOTO=http://www.iopus.com/imacros/demo/v4/f1/form.asp ' reset size so that the big text box and the submit button are "hidden" SIZE X=823 Y=300 ' enter Remarks CLICK X=458 Y=510 CONTENT=Without<SP>apples ' press submit CLICK X=358 Y=644 CONTENT=Click<SP>to<SP>order<SP>now
Related forum post: