|
255 | 255 | in <code>Supported Python Versions</code> on <a href=https://pypi.org/project/selenium/>PyPi</a></p><p>There are a couple different ways to install Selenium.</p><h3 id=pip>Pip</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>pip install selenium
|
256 | 256 | </span></span></code></pre></div><br><h3 id=download>Download</h3><p>Alternatively you can download the <a href=https://pypi.org/project/selenium/#files>PyPI source archive</a>
|
257 | 257 | (selenium-x.x.x.tar.gz) and install it using <em>setup.py</em>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>python setup.py install
|
258 |
| -</span></span></code></pre></div><br><h3 id=require-in-project>Require in project</h3><p>To use it in a project, add it to the <code>requirements.txt</code> file:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-txt data-lang=txt><span style=display:flex><span>selenium==4.23.1</span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/requirements.txt#L1 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
| 258 | +</span></span></code></pre></div><br><h3 id=require-in-project>Require in project</h3><p>To use it in a project, add it to the <code>requirements.txt</code> file:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-txt data-lang=txt><span style=display:flex><span>selenium==4.24.0</span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/requirements.txt#L1 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
259 | 259 | <strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-00-02 role=tabpanel aria-labelled-by=tabs-00-02-tab tabindex=0><p>A list of all supported frameworks for each version of Selenium
|
260 | 260 | is available on <a href=https://www.nuget.org/packages/Selenium.WebDriver>Nuget</a></p><p>There are a few options for installing Selenium.</p><h3 id=packet-manager>Packet Manager</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>Install-Package Selenium.WebDriver
|
261 | 261 | </span></span></code></pre></div><br><h3 id=net-cli>.NET CLI</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>dotnet add package Selenium.WebDriver
|
262 |
| -</span></span></code></pre></div><br><h3 id=csproj>CSProj</h3><p>in the project’s <code>csproj</code> file, specify the dependency as a <code>PackageReference</code> in <code>ItemGroup</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-csproj data-lang=csproj><span style=display:flex><span> <span style=color:#204a87;font-weight:700><PackageReference</span> <span style=color:#c4a000>Include=</span><span style=color:#4e9a06>"Selenium.WebDriver"</span> <span style=color:#c4a000>Version=</span><span style=color:#4e9a06>"4.23.0"</span> <span style=color:#204a87;font-weight:700>/></span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj#L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
| 262 | +</span></span></code></pre></div><br><h3 id=csproj>CSProj</h3><p>in the project’s <code>csproj</code> file, specify the dependency as a <code>PackageReference</code> in <code>ItemGroup</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-csproj data-lang=csproj><span style=display:flex><span> <span style=color:#204a87;font-weight:700><PackageReference</span> <span style=color:#c4a000>Include=</span><span style=color:#4e9a06>"Selenium.WebDriver"</span> <span style=color:#c4a000>Version=</span><span style=color:#4e9a06>"4.24.0"</span> <span style=color:#204a87;font-weight:700>/></span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj#L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
263 | 263 | <strong>View full example on GitHub</strong></a></div><h3 id=additional-considerations>Additional considerations</h3><p>Further items of note for using Visual Studio Code (vscode) and C#</p><p>Install the compatible .NET SDK as per the section above.
|
264 | 264 | Also install the vscode extensions (Ctrl-Shift-X) for C# and NuGet.
|
265 | 265 | Follow the <a href="https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code?pivots=dotnet-5-0">instruction here</a>
|
|
278 | 278 | Press Enter and select the version.
|
279 | 279 | Now you can use the examples in the documentation related to C# with vscode.</p></div><div class="tab-body tab-pane fade" id=tabs-00-03 role=tabpanel aria-labelled-by=tabs-00-03-tab tabindex=0><p>You can see the minimum required version of Ruby for any given Selenium version
|
280 | 280 | on <a href=https://rubygems.org/gems/selenium-webdriver/>rubygems.org</a></p><p>Selenium can be installed two different ways.</p><h3 id=install-manually>Install manually</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>gem install selenium-webdriver
|
281 |
| -</span></span></code></pre></div><br><h3 id=add-to-projects-gemfile>Add to project’s gemfile</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Gemfile data-lang=Gemfile><span style=display:flex><span><span style=color:#000>gem</span> <span style=color:#4e9a06>'selenium-devtools'</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>'= 0.127.0'</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/Gemfile#L10 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
| 281 | +</span></span></code></pre></div><br><h3 id=add-to-projects-gemfile>Add to project’s gemfile</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Gemfile data-lang=Gemfile><span style=display:flex><span><span style=color:#000>gem</span> <span style=color:#4e9a06>'selenium-devtools'</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>'= 0.128.0'</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/Gemfile#L10 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
282 | 282 | <strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-00-04 role=tabpanel aria-labelled-by=tabs-00-04-tab tabindex=0><p>You can find the minimum required version of Node for any given version of Selenium in the
|
283 | 283 | <code>Node Support Policy</code> section on <a href=https://www.npmjs.com/package/selenium-webdriver>npmjs</a></p><p>Selenium is typically installed using npm.</p><h3 id=install-locally>Install locally</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>npm install selenium-webdriver
|
284 | 284 | </span></span></code></pre></div><br><h3 id=add-to-project>Add to project</h3><p>In your project’s <code>package.json</code>, add requirement to <code>dependencies</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-json data-lang=json><span style=display:flex><span> <span style=color:#4e9a06>"mocha"</span><span style=color:#a40000>:</span> <span style=color:#4e9a06>"10.7.3"</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/javascript/package.json#L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
|
|
0 commit comments