selva
selva

Reputation: 1175

Full-Calendar Automation using selenium

how to do the full-Calendar automation using selenium.. in picture shown below i want to click on Marzp 26 at time 11:00 it is a jQuery plugin .. Please help

enter image description here

Upvotes: 1

Views: 1168

Answers (1)

Chuck
Chuck

Reputation: 1089

Some of the grids in Fullcalendar can be tricky to work with because they are built in z-layers. One way to deal with this is to use selenium to move the mouse just like a user would.

This can be accomplished using action chains:

from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

# Get the row for 11:00:00
time_row = self.browser.find_element_by_css_selector('tr[data-time="11:00:00"]')
action = ActionChains(self.browser)

# Select the day by moving a fraction of the width of the <tr>
# In this case, I am moving to Wed on the 7-day agendaWeek view.
action.move_to_element_with_offset(time_row, time_row.rect['width']/2, time_row.rect['height']/2)
action.click()
action.perform()

Upvotes: 2

Related Questions