I have a case in which I have to pick 3 days back date from the calendar.How to automate this case using selenium.I am using java with selenium for automation..
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
here i show you my orignal code for automating jqueryui calender from its official site "https://jqueryui.com/resources/demos/datepicker/default.html".
copy paste the code and see it working like charm :)
vote up if you like it :) regards Avadh Goyal
1) Assumption is that you can write the date in the input field and calendar is only the icon. You can have helper method something like this
And later in the code
2) If you can only click the calendar, It would be little more tricky. You still need the String, but little different:
But the above has little catch. If the date is 1.4. then it will return you "29" which could be interpreted as 29.4. which you dont want to happen. So later in the code you will probably have to do this