I am a newb at thing.
I have image map area and on of this area a function is firing where the click is being passed to do some calculation.
I have recorded the scenario with Selenium and it produced Click command for it.
What I see is that it enters into the function but the event object not got.
I tried fireEvent and set value Click instead of Click. The result is same.

Can anybody please guide me to anything ?

Image map area :

<map>
<area shape="poly" alt="frontTrunk" onclick="setPositionCheck('frontTrunk');checkPosition($('bodyDiv'),event);" />
</map>

js function :

function checkPosition(obj, event) {
    var bodyImgPos = findPos($(Prefix + "bodyImg"));
    var bodyImg = $(Prefix + "bodyImg");

    pos_x = event.pageX ? (event.pageX - bodyImgPos[0]) : (event.offsetX);
    pos_y = event.pageY ? (event.pageY - bodyImgPos[1]) : (event.offsetY);

}

Selenium IDE source

<tr>
    <td>fireEvent</td>
    <td>css=area[alt=&quot;frontTrunk&quot;]</td>
    <td>click</td>
</tr>



Source link https://sqa.stackexchange.com/questions/6019/how-to-get-the-event-object-of-the-click-event-on-selenium-ide

LEAVE A REPLY

Please enter your comment!
Please enter your name here