Invicti Form Authentication API
Invicti Form Authentication API
auth
Contains form authentication helper methods.
Methods
applyOtp(otpopt)
Parameters:
click(el, delayopt)
Parameters:
Example
// Click element by id
invicti.auth.click('LoginButton');
// Click element by id after 2 seconds
invicti.auth.click('LoginButton', 2000);
// Click element by DOM element reference
invicti.auth.click(document.getElementsByTagName('BUTTON')[0]);
clickByQuery(query, delayopt)
Parameters:
delay number <optional> The number of milliseconds (thousandths of a second) that the
click should be delayed by. Note that all delays are timed from the
beginning of the script execution and does not work in sequence
if you have several function calls with delay.
Example
clickByQueryAsync(query, delayopt)
Simulates a click for the element specified by the CSS with waiting query selector.
Parameters:
delay number <optional> The number of milliseconds (thousandths of a second) that the
click should be delayed by. Note that all delays are timed from the
beginning of the script execution and does not work in sequence
if you have several function calls with delay.
Example
Parameters:
Example
log(message)
Logs a message.
Parameters:
Example
Parameters:
Example
1. If called with a string parameter, sends a GET request to the given URI and returns the response
(async).
2. If called with no parameters, returns a requestObject to be passed to the function itself (async).
This function returns a response object which is explained at the latest example.
Parameters:
Examples
Parameters:
Example
// Basic sample.
invicti.auth.setCurrentPersona('john.doe', 'password', '123456');
Parameters:
Example
// Set value by id
invicti.auth.setInputValue('Username', 'john.doe');
// Set value after 2 seconds
invicti.auth.setInputValue('Username', 'john.doe', 2000);
// Set value by DOM element reference
invicti.auth.setInputValue(document.forms[0].elements[0], 'john.doe');
setOtpField(query, value, isExactMatch)
Tries to find OTP field using the CSS query and sets its value.
Parameters:
isExactMatch boolean The boolean value whether the CSS query is matches OTP field
exactly.
Example
Tries to find OTP field using the CSS query asynchronously and sets its value.
Parameters:
isExactMatch number The number of milliseconds (thousandths of a second) that this set
value operation should be delayed by. Note that all delays are timed
from the beginning of the script execution and does not work in
sequence if you have several function calls with delay.
Example
Finds input element using the CSS query and sets its value.
Parameters:
delay number <optional> The number of milliseconds (thousandths of a second) that this
set value operation should be delayed by. Note that all delays are
timed from the beginning of the script execution and does not
work in sequence if you have several function calls with delay.
Example
Finds input element using the CSS query asynchronously and sets its value with waiting query
selector.
Parameters:
delay number <optional> The number of milliseconds (thousandths of a second) that this
set value operation should be delayed by. Note that all delays are
timed from the beginning of the script execution and does not
work in sequence if you have several function calls with delay.
Example
Waits until the dom element loaded then returns the element using the CSS query asynchronously.
Parameters:
Example
waitTimeoutAsync(delayopt)
Parameters:
delay number <optional> The number of milliseconds (thousandths of a second) that this
set value operation should be delayed by.
Example
// Wait timeout
invicti.auth.waitTimeoutAsync(5000);