"FILL" Command

Description: This command is used to fill any value in a text box or text area defined by a locator or inline XPath.

Usage Scenario: Suppose we want to fill the “Email” text box on our Reference app after navigating to the Login page.

Procedure: Define a locator for the text box where the HTML tag is, or use an inline XPath

<input id="email" type="email" name="email" class="form-control ng-pristine ng-valid ng-empty ng-valid-email ng-touched" placeholder="Email" autofocus="" ng-model="ctrl.credentials.username" style="">

The XPath is:

//input[contains(@placeholder, 'Email')]

Select the locator in your command options and enter a value in the “Value” field. Your steps will look like this:

Web Locator:

image-20240206-134108.png
image-20240206-134125.png

 

Inline XPath:

 

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The video following video demonstrates how the the “Email” and “Password” fields are filled in the execution as part of “subject7_website_login_logout” test case in “subject7_samples” folder: