| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <title> |
| Class: Selenium::WebDriver::Remote::Http::Common |
| |
| — Documentation by YARD 0.8.1 |
| |
| </title> |
| |
| <link rel="stylesheet" href="../../../../css/style.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <link rel="stylesheet" href="../../../../css/common.css" type="text/css" media="screen" charset="utf-8" /> |
| |
| <script type="text/javascript" charset="utf-8"> |
| hasFrames = window.top.frames.main ? true : false; |
| relpath = '../../../../'; |
| framesUrl = "../../../../frames.html#!" + escape(window.location.href); |
| </script> |
| |
| |
| <script type="text/javascript" charset="utf-8" src="../../../../js/jquery.js"></script> |
| |
| <script type="text/javascript" charset="utf-8" src="../../../../js/app.js"></script> |
| |
| |
| </head> |
| <body> |
| <div id="header"> |
| <div id="menu"> |
| |
| <a href="../../../../_index.html">Index (C)</a> » |
| <span class='title'><span class='object_link'><a href="../../../../Selenium.html" title="Selenium (module)">Selenium</a></span></span> » <span class='title'><span class='object_link'><a href="../../../WebDriver.html" title="Selenium::WebDriver (module)">WebDriver</a></span></span> » <span class='title'><span class='object_link'><a href="../../Remote.html" title="Selenium::WebDriver::Remote (module)">Remote</a></span></span> » <span class='title'><span class='object_link'><a href="../Http.html" title="Selenium::WebDriver::Remote::Http (module)">Http</a></span></span> |
| » |
| <span class="title">Common</span> |
| |
| |
| <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> |
| </div> |
| |
| <div id="search"> |
| |
| <a class="full_list_link" id="class_list_link" |
| href="../../../../class_list.html"> |
| Class List |
| </a> |
| |
| <a class="full_list_link" id="method_list_link" |
| href="../../../../method_list.html"> |
| Method List |
| </a> |
| |
| <a class="full_list_link" id="file_list_link" |
| href="../../../../file_list.html"> |
| File List |
| </a> |
| |
| </div> |
| <div class="clear"></div> |
| </div> |
| |
| <iframe id="search_frame"></iframe> |
| |
| <div id="content"><h1>Class: Selenium::WebDriver::Remote::Http::Common |
| |
| |
| <span class="private note title">Private</span> |
| </h1> |
| |
| <dl class="box"> |
| |
| <dt class="r1">Inherits:</dt> |
| <dd class="r1"> |
| <span class="inheritName">Object</span> |
| |
| <ul class="fullTree"> |
| <li>Object</li> |
| |
| <li class="next">Selenium::WebDriver::Remote::Http::Common</li> |
| |
| </ul> |
| <a href="#" class="inheritanceTree">show all</a> |
| |
| </dd> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <dt class="r2 last">Defined in:</dt> |
| <dd class="r2 last">rb/lib/selenium/webdriver/remote/http/common.rb</dd> |
| |
| </dl> |
| <div class="clear"></div> |
| |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This class is part of a private API.</strong> |
| You should avoid using this class if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><div id="subclasses"> |
| <h2>Direct Known Subclasses</h2> |
| <p class="children"><span class='object_link'><a href="Curb.html" title="Selenium::WebDriver::Remote::Http::Curb (class)">Curb</a></span>, <span class='object_link'><a href="Default.html" title="Selenium::WebDriver::Remote::Http::Default (class)">Default</a></span></p> |
| </div> |
| |
| <h2>Constant Summary</h2> |
| |
| <dl class="constants"> |
| |
| <dt id="MAX_REDIRECTS-constant" class="">MAX_REDIRECTS = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| <p>same as chromium/gecko</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='int'>20</span></pre></dd> |
| |
| <dt id="CONTENT_TYPE-constant" class="">CONTENT_TYPE = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>application/json</span><span class='tstring_end'>"</span></span></pre></dd> |
| |
| <dt id="DEFAULT_HEADERS-constant" class="">DEFAULT_HEADERS = |
| <div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This constant is part of a private API.</strong> |
| You should avoid using this constant if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div> |
| </dt> |
| <dd><pre class="code"><span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Accept</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='const'>CONTENT_TYPE</span> <span class='rbrace'>}</span></pre></dd> |
| |
| </dl> |
| |
| |
| |
| |
| |
| <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#server_url%3D-instance_method" title="#server_url= (instance method)">- (Object) <strong>server_url</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| <span class="note title writeonly">writeonly</span> |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#timeout-instance_method" title="#timeout (instance method)">- (Object) <strong>timeout</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| |
| |
| |
| <h2> |
| Instance Method Summary |
| <small>(<a href="#" class="summary_toggle">collapse</a>)</small> |
| </h2> |
| |
| <ul class="summary"> |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(verb, url, command_hash) </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#close-instance_method" title="#close (instance method)">- (Object) <strong>close</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'></div></span> |
| |
| </li> |
| |
| |
| <li class="public "> |
| <span class="summary_signature"> |
| |
| <a href="#initialize-instance_method" title="#initialize (instance method)">- (Common) <strong>initialize</strong> </a> |
| |
| |
| |
| </span> |
| |
| |
| <span class="note title constructor">constructor</span> |
| |
| |
| |
| |
| |
| <span class="private note title">private</span> |
| |
| |
| <span class="summary_desc"><div class='inline'> |
| <p>A new instance of Common.</p> |
| </div></span> |
| |
| </li> |
| |
| |
| </ul> |
| |
| |
| <div id="constructor_details" class="method_details_list"> |
| <h2>Constructor Details</h2> |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="initialize-instance_method"> |
| |
| - (<tt><span class='object_link'><a href="" title="Selenium::WebDriver::Remote::Http::Common (class)">Common</a></span></tt>) <strong>initialize</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| <p>A new instance of Common</p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 13 |
| 14 |
| 15</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/remote/http/common.rb', line 13</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> |
| <span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='kw'>nil</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| <div id="instance_attr_details" class="attr_details"> |
| <h2>Instance Attribute Details</h2> |
| |
| |
| <span id="server_url=-instance_method"></span> |
| <span id="server_url-instance_method"></span> |
| <div class="method_details first"> |
| <h3 class="signature first" id="server_url=-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>server_url=</strong>(value) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 11 |
| 12 |
| 13</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/remote/http/common.rb', line 11</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_server_url='>server_url=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> |
| <span class='ivar'>@server_url</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| |
| <span id="timeout=-instance_method"></span> |
| <span id="timeout-instance_method"></span> |
| <div class="method_details "> |
| <h3 class="signature " id="timeout-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>timeout</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 10 |
| 11 |
| 12</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/remote/http/common.rb', line 10</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_timeout'>timeout</span> |
| <span class='ivar'>@timeout</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| |
| <div id="instance_method_details" class="method_details_list"> |
| <h2>Instance Method Details</h2> |
| |
| |
| <div class="method_details first"> |
| <h3 class="signature first" id="call-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>call</strong>(verb, url, command_hash) |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 21 |
| 22 |
| 23 |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 |
| 33 |
| 34 |
| 35 |
| 36 |
| 37 |
| 38 |
| 39 |
| 40 |
| 41</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/remote/http/common.rb', line 21</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_command_hash'>command_hash</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_server_url'>server_url</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>URI</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_headers'>headers</span> <span class='op'>=</span> <span class='const'>DEFAULT_HEADERS</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> |
| <span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cache-Control</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>no-cache</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_verb'>verb</span> <span class='op'>==</span> <span class='symbol'>:get</span> |
| |
| <span class='kw'>if</span> <span class='id identifier rubyid_command_hash'>command_hash</span> |
| <span class='id identifier rubyid_payload'>payload</span> <span class='op'>=</span> <span class='const'>WebDriver</span><span class='period'>.</span><span class='id identifier rubyid_json_dump'>json_dump</span><span class='lparen'>(</span><span class='id identifier rubyid_command_hash'>command_hash</span><span class='rparen'>)</span> |
| <span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>CONTENT_TYPE</span><span class='rbrace'>}</span><span class='tstring_content'>; charset=utf-8</span><span class='tstring_end'>"</span></span> |
| <span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Content-Length</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_payload'>payload</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>if</span> <span class='lbracket'>[</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='symbol'>:put</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='rparen'>)</span> |
| |
| <span class='kw'>if</span> <span class='gvar'>$DEBUG</span> |
| <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> >>> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_payload'>payload</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> |
| <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> > </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> |
| <span class='kw'>end</span> |
| <span class='kw'>elsif</span> <span class='id identifier rubyid_verb'>verb</span> <span class='op'>==</span> <span class='symbol'>:post</span> |
| <span class='id identifier rubyid_payload'>payload</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{}</span><span class='tstring_end'>"</span></span> <span class='comment'># work around http://code.google.com/p/selenium/issues/detail?id=1396 |
| </span> <span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Content-Length</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>2</span><span class='tstring_end'>"</span></span> |
| <span class='kw'>end</span> |
| |
| <span class='id identifier rubyid_request'>request</span> <span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_headers'>headers</span><span class='comma'>,</span> <span class='id identifier rubyid_payload'>payload</span> |
| <span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| <div class="method_details "> |
| <h3 class="signature " id="close-instance_method"> |
| |
| - (<tt>Object</tt>) <strong>close</strong> |
| |
| |
| |
| |
| |
| </h3><div class="docstring"> |
| <div class="discussion"> |
| <p class="note private"> |
| <strong>This method is part of a private API.</strong> |
| You should avoid using this method if possible, as it may be removed or be changed in the future. |
| </p> |
| |
| |
| </div> |
| </div> |
| <div class="tags"> |
| |
| |
| </div><table class="source_code"> |
| <tr> |
| <td> |
| <pre class="lines"> |
| |
| |
| 17 |
| 18 |
| 19</pre> |
| </td> |
| <td> |
| <pre class="code"><span class="info file"># File 'rb/lib/selenium/webdriver/remote/http/common.rb', line 17</span> |
| |
| <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span> |
| <span class='comment'># hook for subclasses - will be called on Driver#quit |
| </span><span class='kw'>end</span></pre> |
| </td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| <div id="footer"> |
| Generated on Thu Jul 19 12:32:30 2012 by |
| <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> |
| 0.8.1 (ruby-1.9.3). |
| </div> |
| |
| </body> |
| </html> |