I use fullcalendar in my project. When I click the mouse for some time of the day, the event handler is triggered in the calendar, as in this example.

$(document).ready(function() { $('#mainCalendar').fullCalendar({ defaultView: 'agendaDay', selectable: true, select: onCalendarSelect, }); }); function onCalendarSelect(start, end) { alert('hello from select event!'); } 
 <link href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.js"></script> <div id = "mainCalendar">< /div> 

But I can understand how to simulate a click on a slot with time using Selenium IDE? Where to click?

  • I do not know the subject matter, because learning java. But this is nuggul - stackoverflow.com/questions/1348937/… - Flippy
  • The question is how to determine the element to click on? - Andrew Bystrov
  • @AndrewBystrov, yes. I found a bunch of commands, click, mouseDown, FireEvent and click on the button, I have no problems, but I can’t figure out what to click - koks_rs
  • Well, you need to determine the element on which you want to click. in this case, to click on line 6am, you need to identify the element somehow (by xpath) .//tr[@data-time='06:00:00 '] - Andrew Bystrov

1 answer 1

It turns out that the problem was not that I clicked the wrong element, but how the click was made. The select event was hung on a sequence of two MouseDown events and then MouseUp .

Therefore, to click on the time for fullcalendar you need to use the following code:

 selenium.MouseDownAt("xpath=(//tr[@data-time='10:00:00']/td[2])", "2,2"); selenium.MouseUp("xpath=(//tr[@data-time='10:00:00'])");