Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Always keep in mind that Selenium is open source.</p> <p>The source of <code>WebDriver/Interactions/Actions.cs</code> is <a href="https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Interactions/Actions.cs" rel="nofollow noreferrer">here</a>, clearly you can see <code>Perform()</code> includes <code>Build()</code>, so the answer is no, you don't need to build before perform, unless you want to pass the built <code>IAction</code> around without performing.</p> <pre class="lang-c# prettyprint-override"><code>/// &lt;summary&gt; /// Builds the sequence of actions. /// &lt;/summary&gt; /// &lt;returns&gt;A composite &lt;see cref="IAction"/&gt; which can be used to perform the actions.&lt;/returns&gt; public IAction Build() { CompositeAction toReturn = this.action; this.action = new CompositeAction(); return toReturn; } /// &lt;summary&gt; /// Performs the currently built action. /// &lt;/summary&gt; public void Perform() { this.Build().Perform(); } </code></pre> <p>Also, for anyone else reading this post:</p> <p>Java binding: <code>build()</code> is included in <code>perform()</code>. Source: <a href="https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/interactions/Actions.java" rel="nofollow noreferrer">interactions/Actions.java</a></p> <p>Ruby/Python: only have <code>perform</code>, no such thing called <code>build</code>. Source: <a href="https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/common/action_chains.py" rel="nofollow noreferrer">action_chains.py</a>, <a href="https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/common/action_builder.rb" rel="nofollow noreferrer">action_builder.rb</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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