I have problem with identifying this link and Button in selenium-- plz help me out

5 views
Skip to first unread message

Balaji Singh .Y

unread,
Jan 11, 2011, 12:43:37 AM1/11/11
to seleniu...@googlegroups.com

 

 

Hi,

 

I need to automate few things in selenium which I found it difficult so though of seeking your advice, so plz kindly help me.

 

1 .Please click on this link

 

http://www.allhotels.com/hotels/dallas-texas?destination=Dallas&checkInDate=02-15-2011&checkOutDate=02-16-2011&numRooms=1&num_adults_id_1=1&num_children_id_1=0&polygonId=TX172-H100&stateCode=TX&countryCode=US&categoryCode=CTY&lang=en&currencyCode=USD&dateFormat=MM-dd-yyyy&randomNo=0.4344904010141216&destinationId=7756#propertyCardDisplay_4

 

 

2 .You will find the list of hotels

3.  Now go to this hotel " Le Meridien Dallas by the Galleria"

 

Hotel snap shot

 

 

Le Meridien Dallas by the Galleria

Le Meridien Dallas by the Galleria

 

4.Now click on more information tab present on his hotel Lee merdian

 

5. You will see an hotel availability

 

6. now you will see the link shown below in the snapshot “Show More Room types link.” And BookNow button.

 

7. So i need to automate this link and button  by clicking on this. But the problem is how to because either way with Xpath or some alternate way  its not recognized.

 

 

So plz kindly help me out on this.



With Regards,
BALAJI SINGH .Y

 

 

 

 

 




--
BALAJI SINGH .Y

farheen khan

unread,
Jan 11, 2011, 1:32:43 AM1/11/11
to seleniu...@googlegroups.com
Hi,
I dint find any problem locating.Instead IDE itself locates.
See the code,

<tr>
    <td>open</td>
    <td>/reserve/le-meridien-dallas-by-the-galleria-11244407?currencyCode=USD&amp;checkInDate=02-15-2011&amp;checkOutDate=02-16-2011&amp;categoryCode=CTY&amp;num_adults_id_1=1&amp;lang=en&amp;destination=Dallas&amp;numRooms=1&amp;num_children_id_1=0&amp;dateFormat=MM-dd-yyyy</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>show-less-rooms0</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>show-more-rooms0</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>//input[@value='Book Now']</td>
    <td></td>
</tr>

Is it what you needed or something else?



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.



--

Farheen
http://seleniumready.blogspot.com/



NeelakandanRVJ

unread,
Jan 11, 2011, 4:36:19 AM1/11/11
to seleniu...@googlegroups.com
Hi,
   Try to use this script....

<?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">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://www.allhotels.com/" />
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/hotels/dallas-texas?destination=Dallas&amp;checkInDate=02-15-2011&amp;checkOutDate=02-16-2011&amp;numRooms=1&amp;num_adults_id_1=1&amp;num_children_id_1=0&amp;polygonId=TX172-H100&amp;stateCode=TX&amp;countryCode=US&amp;categoryCode=CTY&amp;lang=en&amp;currencyCode=USD&amp;dateFormat=MM-dd-yyyy&amp;randomNo=0.4344904010141216&amp;destinationId=7756#propertyCardDisplay_4</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>more-info4</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>show-more-rooms4</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value='Book Now' and @type='button' and @onclick=&quot;javascript:bookNow('room4-0',4)&quot;]</td>
<td></td>
</tr>

</tbody></table>
</body>
</html>
Reply all
Reply to author
Forward
0 new messages