Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6652675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:10:13+00:00 2026-05-26T01:10:13+00:00

Any one know how to use Selenium 2 with Phpunit? Are there any Selenium

  • 0

Any one know how to use Selenium 2 with Phpunit? Are there any Selenium 2 samples in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:10:13+00:00Added an answer on May 26, 2026 at 1:10 am

    Quick update: phpunit does now support Selenium 2

    • https://phpunit.de/manual/3.6/en/selenium.html
    • https://phpunit.de/manual/4.8/en/selenium.html

    At the time of writing, PHPUnit does not support Selenium 2.

    php-webdriver from facebook allows the complete WebDriver API to be called from PHP in an elegant way. To quote:

    Most clients require you to first read the protocol to see what’s
    possible, then study the client itself to see how to call it. This
    hopes to eliminate the latter step.

    It is used by starting up the Selenium 2 server, which provides the interface at localhost:4444/wd/hub.

    /usr/bin/java -jar /path/to/selenium-server-standalone-2.7.0.jar
    

    then running the PHP test code, which calls that interface. For example:

    <?php
    
    require '/path/to/php-webdriver/__init__.php';
    
    $webdriver = new WebDriver();
    
    $session = $webdriver->session('opera', array());
    $session->open("http://example.com");
    $button = $session->element('id', 'my_button_id');
    $button->click();
    $session->close();
    

    The WebDriver API is mapped to PHP methods, compare calling click on element in the example with the element/click API call in the documentation.

    The test code can then be wrapped in regular phpUnit tests.

    This is not native phpUnit support, but it’s a quite robust approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any one know samples/tutorials of how to use Freetype in win32 apps
Does any one know of a control that i can use with a ASP.Net
any one know how to use vertical tabs with jquery. In my web site
Does any one know of any Java libraries I could use to generate canonical
Any one know how to use the Google translate API using c
there is one icu4c project at android platform (external/icu4u) any one know how to
Does any one know the script to use for text search in SQL Server?
Does any one know if it is possible to use the Default Google Scatter
Does any one know what is SWC and where we use this SWC in
Hi Does any one know how to use facebook chat apis with ios, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.