"CLEAR" Command
Description: This command clears an HTML text box identified by a web locator or inline XPath.
Usage Scenario: Suppose we want to clear the Birthday text box which is on the Edit Profile page in our Reference app.
Procedure: Define steps that lead up to “Edit Profile” page and then define a locator with reference name: "subject7_reference_edit_profile.text.birthday" where the HTML tag is
<input type="text" id="birthday" ng-model="ctrl.profile.birthday" placeholder="dd.MM.yyyy" class="form-control ng-valid ng-isolate-scope ng-valid-date ng-empty ng-dirty ng-touched" uib-datepicker-popup="dd.MM.yyyy" datepicker-options="ctrl.datePicker.options" is-open="ctrl.isOpen" enable-time="false" close-text="Close" style="">
and the XPath is:
//label[contains(@for, 'birthday')]/ancestor::div/descendant::input[@placeholder='dd.MM.yyyy']
In your step, select Clear command and select the locator or add an inline XPath. Your step will look like this:
Web Locator:
Inline XPath:
See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_account_cleanup