18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

trouble clicking dynamic a td (edited) Sahi handles "onclick" of TD??

bagsmodebagsmode Members
edited August 2012 in Sahi - Open Source
Wanting to test our routines manipulating fullCalendar.

First of all, when you click an empty cell within the table of the calendar, it should pop up a modal in which we schedule an event.

My problem is getting the click to work on a TD via just the class names (I'm guessing that's the way that I'd have to determine it). I'm assuming, since no link in the table, the plugin has an "onclick" event for the td. The HTML of the table follows:

<table class="fc-agenda-slots" >
<tbody>
<tr class="fc-slot0 ">
<th class="fc-agenda-axis fc-widget-header">12am</th>
<td class="fc-widget-content">
<div style="position:relative"> </div>
</td>
</tr>
<tr class="fc-slot1 fc-minor>
<th class="fc-agenda-axis fc-widget-header"> </th>
<td class="fc-widget-content">
<div style="position:relative"> </div>
</td>
..etc..

In order to chose a certain time, I have to click one of the "fc-widget-content" classes within the fc-slot# that I desire.

Can someone put together a command that would simulate one for me, please?
Tried all of the following (plus others that I discarded), but none are working:
_click(_div(175));
_click(_cell(_table(_byClassName("fc-agenda-slots")), _byClassName("fc-slot10") ));
_click(_cell(_byClassName("fc-widget-content")), _under("tr", _byClassName("fc-slot10")));

Any help appreciated.
Glenn

EDIT: I'm finding that the table is loaded dynamically, but when I do asserts, I can find the TD, but just not execute the click on it:

_assert(_isVisible( _parentNode(_div(158),"TD") )); // this works

_click( _parentNode(_div(158),"TD") ); // this does nothing
Sign In or Register to comment.