Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Assuming your wanting to only work with Selenium Core and/or IDE and you want to persist this information, then you might <strong>try sending it to some type of free online service via javascript</strong> call. Selenium can execute an arbitrary piece of javascript via an eval call (example <a href="http://www.nabble.com/How-to-call-Javascript-functions-from-Selenium-HTML-TestCase---td16077211.html" rel="nofollow noreferrer">here</a>).</p> <p>One possible suggestion would be a <strong>twitter</strong> account (or other free online public service with a simple API). A modification of the bookmarklet that <strong><a href="http://pcsplace.com/web-20/twitlet-easiest-way-to-update-twitter-status-from-any-browser/" rel="nofollow noreferrer">Twitlet</a></strong> produces could post to a twitter account any information you want.</p> <p>Another option might be a <strong>google document</strong> or some other online note service.</p> <p>If you don't really need Selenium to persist the information, but want it aggregated and shown at the end of the execution, you might store each set of business hours in a variable, appending as you go, and then <strong>have your last action be to evaluate javascript that will popup an alert box with the results</strong>. You could then manually consume the data in the alert box.</p> <p><strong><em>Just some ideas. Good luck.</em></strong></p> <p>EDIT-</p> <p>Here is an example of storing a value and retrieving it along with executing arbitrary javascript via the eval and runscript methods on the google homepage:</p> <pre><code>&lt;tr&gt; &lt;td&gt;open&lt;/td&gt; &lt;td&gt;/&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;type&lt;/td&gt; &lt;td&gt;q&lt;/td&gt; &lt;td&gt;dog&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;clickAndWait&lt;/td&gt; &lt;td&gt;btnG&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;storeValue&lt;/td&gt; &lt;td&gt;q&lt;/td&gt; &lt;td&gt;searchWord&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertValue&lt;/td&gt; &lt;td&gt;q&lt;/td&gt; &lt;td&gt;${searchWord}&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertEval&lt;/td&gt; &lt;td&gt;alert(&amp;quot;${searchWord}&amp;quot;);&lt;/td&gt; &lt;td&gt;null&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;runScript&lt;/td&gt; &lt;td&gt;alert(&amp;quot;${searchWord}&amp;quot;);&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertAlert&lt;/td&gt; &lt;td&gt;dog&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload