FAQ
I wrote the following code for user-extension but I'm not able to store the
value of the array on the selenium IDE in order to use it in a label.
Any help will be greatly appreciated.


********************User Extension*********************

Selenium.prototype.doRandomCity= function(locator)
{
     var myArray = ['Atlanta','Atlantic
City','Austin','Baltimore','Boston','Chicago',
         'Cleveland','Dallas / Ft. Worth','Denver','Houston','Los
Angeles','Minneapolis',
         'New York City','Orange
County','Philadelphia','Phoenix','Portland','San Antonio',
         'San Diego','San Francisco','Seattle','St. Louis','Washington
DC','National'];
     var rand = myArray[Math.floor(Math.random() * myArray.length)];
     alert(rand);
     selenium.doType(locator,rand);
}

*********************************
<tr>
     <td>select</td>
     <td>id=deal_city</td>
     <td>label=${city}</td>
</tr>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7abb2b56-795b-4189-ae73-fb05668b54a6%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedJun 12, '13 at 4:17a
activeJun 12, '13 at 4:17a
posts1
users1
websiteseleniumhq.org

1 user in discussion

Gideon Bromand: 1 post

People

Translate

site design / logo © 2022 Grokbase