This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
4 Replies Last post: Jan 7, 2009 8:46 AM by anatar02  
SatyaI Beginner 2 posts since
Jan 6, 2009
Currently Being Moderated

Jan 6, 2009 1:56 AM

How to record selecting a date from calender in firefox as it is displaying "LOCATOR_DETECTION_FAILED" while selecting the date in calender

While recording selecting a date from calendar in fire fox it is generates the below code.

 

<tr>
<td>click</td>
<td>checkin_trigger</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>LOCATOR_DETECTION_FAILED</td>
<td></td>
</tr>

 

" LOCATOR_DETECTION_FAILED" is generated when selecting a date in calender.

 

Can anybody help me to solve this issue. Thanks in advance.

 

Satya

gim_h Almighty 736 posts since
Oct 17, 2007

it is probably an ajax issue.can you post the url or html source of your webapp?

gim_h Almighty 736 posts since
Oct 17, 2007

hi Satyal,

    that's too much code you posted, i can't understand it, but i guess you webapp is http://www.discoveramerica.com

    if so, you should file a bug to slenium ide and say the ide can't record the xpath of the popup calendar. when i was recording the script about the calendar, i got the same error as you.

    fortunately, css locator works, but you have to manually write test scripts, here is a sample:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://www.discoveramerica.com/" />
<title>Test open calendar and select the first day</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test open calendar and select the first day</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>http://www.discoveramerica.com/ca/places.html</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>checkin_trigger</td>
    <td></td>
</tr>
<tr>
    <td>waitForVisible</td>
    <td>css=div.calendar:last-child</td>
    <td></td>
</tr>
<tr>
    <td>mouseDown</td>
    <td>css=div.calendar:last-child td.day:contains('1')</td>
    <td></td>
</tr>
<tr>
    <td>mouseUp</td>
    <td>css=div.calendar:last-child td.day:contains('1')</td>
    <td></td>
</tr>

 

</tbody></table>
</body>
</html>

 

 

anatar02 Master 379 posts since
Apr 4, 2008

In below code will work on Ajax try it out

<tr>
    <td>waitForElementPresent</td>
    <td>Input_DepartDate</td>
    <td></td>
</tr>
<tr>
    <td>assertElementPresent</td>
    <td>Input_DepartDate</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>Input_DepartDate</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>Input_DepartDate</td>
    <td>${Arrive_date}</td>
</tr>
<tr>
    <td>keyDown</td>
    <td>Input_DepartDate</td>
    <td>\13</td>
</tr>

 

Thanks

Ashok N

More Like This

  • Retrieving data ...