robot framework选择时间操作

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/dangdanggege/article/details/84836721

通过给时间控件赋值的方法进行操作:

Assign Id To Element        //*[@id="updateDateEmail_start"]        time1

Execute Javascript  window.document.getElementById('time1').value='08-08-2018'  

Sleep 2              

Assign Id To Element        //*[@id="updateDateEmail_end"]          time2

Execute Javascript  window.document.getElementById('time2').value='08-08-2018'  

分别取得开始时间与结束时间的输入框id,赋予新的id,进行操作,输入要输入的时间,注意时间格式要与手动选择或输入时格式一致。

猜你喜欢

转载自blog.csdn.net/dangdanggege/article/details/84836721