Retrieving data with Selenium
Posted
by
Dennis
on Stack Overflow
See other posts from Stack Overflow
or by Dennis
Published on 2009-02-28T22:55:27Z
Indexed on
2011/01/12
7:54 UTC
Read the original article
Hit count: 251
selenium
|information-retrieval
Hi everyone,
I want to get the business hours from ScotiaBank branches that are near to me.
The base-URL is: http://maps.scotiabank.com/
I then,
Click on the "Branches" radiobox.
Click on the "Open Saturdays" checkbox.
Enter "B3H 1M7" (my postal code) into the search box.
Click the Search button.
Click on the first result that pops up (Micmac shopping centre).
Store the business hours as a variable (called businessHours).
And now I'm stuck.
How can I export the data that I assigned to the variable to a text file or anywhere else where I can view it later? I'm not sure if this is even possible with Selenium, but if it's not, can you tell me an alternative of how I could do this?
Below is the HTML code for the current Selenium script that I have.
<tr>
<td>open</td>
<td>/en/index.php</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>rb_branch</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>cb_saturday</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>input_address</td>
<td>B3H 1M7</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>btn_search_address</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>result0</td>
<td></td>
</tr>
<tr>
<td>storeTextPresent</td>
<td>Mon: 9:30 AM - 5:00 PM Thu: 9:30 AM - 8:00 PM
<br />Tue: 9:30 AM - 5:00 PM Fri: 9:30 AM - 5:00 PM
<br />Wed: 9:30 AM - 5:00 PM Sat: 9:00 AM - 1:00 PM</td>
<td>businessHours</td>
</tr>
© Stack Overflow or respective owner