Watch and Set Credentials in Browser

Verb: watchAndSetBrowserCredentials

Available from: <Standard>

This command watches for any dialog boxes used for credential filling and automatically fills in the credentials with the username and password defined, or cancels the dialog box.

Syntax

watchAndSetBrowserCredentials --browser(Browser) [--cancel(Boolean)] [--cancelxpath(String)] --username(String) --password(String) [--usernamexpath(String)] [--passwordxpath(String)] [--stopaftersignin(Boolean)] [--interval(TimeSpan)] (CancellationTokenSource)=value

Inputs

Script Designer Required AcceptedTypes Description
--browser Browser Required Browser Variable with a browser instance.
It is a "Browser" type variable that stores the instance of a browser. Currently only supports Google Chrome and Internet Explorer.
--cancel Cancel Dialog Box Optional Boolean When enabled, cancels any credential filling dialog box.
--cancelxpath XPath Cancel Button Optional Text XPath of the "Cancel" button in the dialog box.
--username User Name Only whenCancel Dialog Box is False Text Username that should be inserted in the dialog box.
--password Password Only whenCancel Dialog Box is False Text User password that should be inserted in the dialog box.
--usernamexpath XPath User Field Optional Text XPath to the username insertion field.
XPath is optional for the user field. If left blank, the page's default XPath is used. If filled, it overwrites the page pattern.
--passwordxpath XPath Password Field Optional Text The XPath to the password field.
XPath is optional for the password field. If left blank, the page's default XPath is used. If filled, it overwrites the page pattern.
--stopaftersignin Stop After Filling Optional Boolean When enabled, stops watching for dialog boxes after filling in the credentials.
--interval Interval Optional Time Span Time interval between each attempt to complete the credential.

Outputs

Script Designer AcceptedTypes Description
value Cancellation Token Source Cancellation Token Source Cancellation token used to interrupt the process.
This output is a "Cancellation token source" variable, used to interrupt the process in which it was generated. To use this output, you need to use the :Cancel Token Source command. If the Stop After Filling parameter is being used, it is not necessary to use the cancellation token, as the process is interrupted when filling in the credential, otherwise, it is necessary to use the cancellation token.

Example

The Watch and Set Credentials in Browser command fills in the credentials fields, after a server URL is opened and inserted, using the Navigate command.

defVar --name tokenCancelamento --type CancellationTokenSource
defVar --name navegador --type Browser
webStart --name navegador --type "Chrome" navegador=value
watchAndSetBrowserCredentials --browser ${navegador} --username "dlpuser@dlptest.com" --password bbCKucPzfr4b9YXUY7tvsNKyh --stopaftersignin  --interval 00:00:00.0010000 tokenCancelamento=value
webNavigate --url "ftp://ftp.dlptest.com/"
webWait
webClose --name navegador --leavebrowseropen

Remarks

This command must always be used before any interaction with a web page (navigation or click, for example). Its process occurs in the background and is only interrupted when an interruption method is defined.

The command does not support globalization, it only supports English and Portuguese.

See Also

  • Clear Cache
  • Launch SAP Application
  • Maximize or Minimize Window
  • Open URL
  • SAP Transaction
  • Screenshot Window
  • Update Window
  • Wait and Close Security Window
  • Watch and Select Client Certificate