PHPackages                             nearsoft/php-selenium-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. nearsoft/php-selenium-client

ActiveLibrary[Testing &amp; Quality](/categories/testing)

nearsoft/php-selenium-client
============================

This library allows creating Selenium Server V2 tests in PHP. It communicates with the WebDriver API through the official JsonWireProtocol.

v2.0(12y ago)10854.9k↓38.9%41[11 issues](https://github.com/Nearsoft/PHP-SeleniumClient/issues)Apache 2PHPPHP &gt;=5.3.8

Since Oct 8Pushed 12y ago23 watchersCompare

[ Source](https://github.com/Nearsoft/PHP-SeleniumClient)[ Packagist](https://packagist.org/packages/nearsoft/php-selenium-client)[ RSS](/packages/nearsoft-php-selenium-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

PHP-SeleniumClient
==================

[](#php-seleniumclient)

PHP interaction with Selenium Webdriver API

\##Description

This library allows the interaction with Selenium Server V2 in PHP. It communicates with the WebDriver API through the official JsonWireProtocol.

One of the goals is to provide a client usage as close as possible to the Selenium Official libraries (such as Java's, c#'s). Most methods are named as the same as of these libraries'. In this way, whenever a developer runs into ideas or documentation in Java Client, the same techniques can be implemented by using this library.

\##Documentation

[Version 2](http://nearsoft-php-seleniumclient.herokuapp.com/docs/v2/)

[Version 1](http://nearsoft-php-seleniumclient.herokuapp.com/docs/v1/)

\##Quickstart

- Start a session by creating an instance of WebDriver. By default, the test will run in firefox

    ```
      $driver = new WebDriver();

    ```
- As an alternative you can define desired capabilities for the session

    ```
      $desiredCapabilities = new DesiredCapabilities("chrome");
      $driver = new WebDriver($desiredCapabilities);

    ```
- Navigate by using the WebDriver::get method from the WebDriver Class

    ```
      $driver->get("www.nearsoft.com");

    ```
- Get elements from the DOM in current location

    ```
      $textbox1 = $driver->findElement(By::id("someTextBoxId"));

      $button1 = $driver->findElement(By::cssSelector("html body div#content input#someButtonId"));

    ```
- Manipulate located elements

    ```
      $textbox1->sendKeys("Some text to send");

      $textbox1->getAttribute("value");

      $button1->click();

    ```
- Find element within elements

    ```
      $modal1->findElement(By::id("someModalId"));
      $listItems = $modal1->findElements(By::tagName("li"));

    ```
- Switch between windows

    ```
      $driver->switchTo()->window("windowName");

    ```
- Manage alerts $alert = $driver-&gt;switchTo()-&gt;alert(); $alert-&gt;getText(); $alert-&gt;accept(); $alert-&gt;dismiss();
- Wait for elements to be present

    ```
      $webElement = $driver->waitForElementUntilIsPresent(By::id("someElementId"));

      //or

      $wait = new WebDriverWait(8);
      $webElement = $wait->until($driver,"findElement",array(By::id("someElementId"),true));

    ```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~23 days

Total

4

Last Release

4533d ago

Major Versions

v1.5 → v2.02013-12-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/825b7145bd5e9afa0909fc3b431f5432001a5ec66a5a22247ff268c84c9457b9?d=identicon)[jsantiago](/maintainers/jsantiago)

---

Top Contributors

[![yair27](https://avatars.githubusercontent.com/u/421409?v=4)](https://github.com/yair27 "yair27 (7 commits)")[![andrewmackrodt](https://avatars.githubusercontent.com/u/831182?v=4)](https://github.com/andrewmackrodt "andrewmackrodt (4 commits)")[![dextercowley](https://avatars.githubusercontent.com/u/953234?v=4)](https://github.com/dextercowley "dextercowley (4 commits)")[![nenadalm](https://avatars.githubusercontent.com/u/1227933?v=4)](https://github.com/nenadalm "nenadalm (2 commits)")[![0x46616c6b](https://avatars.githubusercontent.com/u/363667?v=4)](https://github.com/0x46616c6b "0x46616c6b (1 commits)")

---

Tags

testingbrowserautomationseleniumnearsoft

### Embed Badge

![Health badge](/badges/nearsoft-php-selenium-client/health.svg)

```
[![Health](https://phpackages.com/badges/nearsoft-php-selenium-client/health.svg)](https://phpackages.com/packages/nearsoft-php-selenium-client)
```

###  Alternatives

[behat/mink-selenium2-driver

Selenium2 (WebDriver) driver for Mink framework

51159.1M666](/packages/behat-mink-selenium2-driver)[behat/mink

Browser controller/emulator abstraction for PHP

1.6k86.1M606](/packages/behat-mink)[symfony/panther

A browser testing and web scraping library for PHP and Symfony.

3.1k14.7M96](/packages/symfony-panther)[behat/mink-browserkit-driver

Symfony2 BrowserKit driver for Mink framework

54562.0M318](/packages/behat-mink-browserkit-driver)[instaclick/php-webdriver

PHP WebDriver for Selenium 2

43661.8M22](/packages/instaclick-php-webdriver)[phpunit/phpunit-selenium

Selenium Server integration for PHPUnit

59610.9M150](/packages/phpunit-phpunit-selenium)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
