How do I send value to a date picker in Robot Framework?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 15:19:32
Rafael Silva

You can send, e.g. a date 6 days from today, directly by setting the value of the datepicker element with javascript:

${my_date_to_select}= Get Current Date    UTC    6 days   %d/%m/%Y
Execute JavaScript  document.getElementById('ID_OF_YOUR_DATEPICKER').value='${my_date_to_select}'

NB: In order to use the keyword 'Get Current Date', you need to add the library DateTime in your settings.

Focus        jquery=[name=expDate]
Press Key    jquery=[name=expDate]    09255639
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!