我正在处理的日历框是将今天的日期作为默认日期,它没有任何特定的ID可以点击日历框,因此,我已经构建了下面的x-path,它当我在Chrome浏览器的控制台区域中尝试它时突出显示该框,但是,它没有单击日历框来选择运行代码时的日期,
这是我的源代码,
我想这是隐藏的,
<div class="hidden-xs hidden-sm item-container--dropdown">
<span ng-bind="$ctrl.selectedDate | date : $ctrl.dateStyleFormat" class="ng-binding">2 May 2018</span>
<span class="dropdown--icon icon icon--calendar"></span>
</div>
<input type="text" ng-focus="$ctrl.openDatePickerPopup()" readonly="" uib-datepicker-popup="dd MMM yyyy" ng-model="$ctrl.selectedDate" is-open="$ctrl.popup.opened" datepicker-options="$ctrl.dateOptions" ng-required="true" close-text="Close" alt-input-formats="$ctrl.altInputFormats" show-button-bar="false" class="ng-pristine ng-valid ng-isolate-scope ng-not-empty ng-valid-required ng-valid-date ng-touched" required="required" style="">
这是我的代码,
driver.findElement(By.xpath("//div[@class='uib-datepicker-wrapper ']/span/input[@ng-model='$ctrl.selectedDate']")).click();