WriteHTMLEncrypted

Web function.

The WriteHTMLEncrypted function writes an encrypted text in a Web form (Not available in WinTask Lite).

Usage

Used to fill automatically a password field on a Web page. Use Recording mode to generate automatically the encrypted password (in Configure/Recording menu, you must have Encrypt web passwords checked), or use Insert/Encrypted string menu option if you prefer to generate it yourself.

Syntax

ret=WriteHTMLEncrypted(<html_descriptor>,<encrypted_text>)

Parameters

<html_descriptor>, unique identifier for the HTML object where to write within the current Web page specified by the last UsePage. See HTML descriptor for HTML tags identification. Use Recording mode for generating automatically the WriteHTMLEncrypted syntax.

<encrypted_text>, string, encrypted text to be typed in the password field.

Return value

Ret, numeric return code. The function tries to find the HTML object for 30 seconds (this default value can be changed using #ActionTimeout), and then types the encrypted text. If the object has been found, the function returns 0. Otherwise use this return code for Error Handling.

List of negative error codes

-1

No browser in use (no previous UsePage or StartBrowser)

-3

Bad descriptor, invalid syntax

-4

The browser has been lost (for instance because of a Closewindow)

-5

Page not found

-8

Specified element not found

-11

Any other error

-404,405

Usual http error codes (requires IE 6 or above)

See also

Encrypt

Example

 
UsePage("Barclays")

 WriteHTML("INPUT TEXT[NAME= 'nocompte']", "46XT38000T")

 WriteHTMLEncrypted("INPUT PASSWORD[NAME= 'passe']", "Hbh0SSJXXjA2vbB1wD2")

 ClickHTMLElement("INPUT IMAGE[NAME= 'img3']")