Simulates a click on an element.
#Include <FF.au3>
_FFClick($sElement[, $sMode = "elements"[, $iIndex = 0[, $bLoadWait = True]]])
Parameters
$sElement | Element to click on by ID, name, class or tag |
||||||||||||
$sMode |
|
||||||||||||
$iIndex | Index of the element with name, class or tag in $ sElement from 0-n 0 = (Default), the first element with the specified name, class or tag. |
||||||||||||
$bLoadWait | Optional: Waits until the page is loading. True = (Default) |
Return Value
Success: | Returns 1 |
Failure: | Returns 0 and sets @ERROR |
@ERROR: | 0 ($_FF_ERROR_Success) 3 ($_FF_ERROR_InvalidDataType) 4 ($_FF_ERROR_InvalidValue) |
Remarks
Related
_FFImageClick, _FFLinkClick. _FFImageMapClick
Example
#Include <FF.au3> _FFStart("http://ff-au3-example.thorsten-willert.de/") If _FFIsConnected() Then _FFClick("img", "tag", 5) ; clicks on the 5th image Sleep(1000) $sObj = _FFXpath("//img[@alt='test_bild_3']","",9) ; get the image with the alt-text test_bild_3 ... _FFClick($sObj) ; ... and click on it Sleep(1000) _FFWindowClose() Else MsgBox(0,"Error:", "Can't connect to FireFox!") EndIf