Code Monkey home page Code Monkey logo

php-webdriver's Introduction

php-webdriver โ€“ Selenium WebDriver bindings for PHP

Latest Stable Version Total Downloads License

Description

Php-webdriver library is PHP language binding for Selenium WebDriver, which allows you to control web browsers from PHP.

This WebDriver client aims to be as close as possible to bindings in other languages. The concepts are very similar to the Java, .NET, Python and Ruby bindings for WebDriver.

This is new version of PHP client, rewritten from scratch starting 2013. Using the old version? Check out Adam Goucher's fork of it at https://github.com/Element-34/php-webdriver

Looking for API documentation of php-webdriver? See http://facebook.github.io/php-webdriver/

Any complaint, question, idea? You can post it on the user group https://www.facebook.com/groups/phpwebdriver/.

Installation

Installation is possible using Composer.

If you don't already use Composer, you can download the composer.phar binary:

curl -sS https://getcomposer.org/installer | php

Then install the library:

php composer.phar require facebook/webdriver

Getting started

All you need as the server for this client is the selenium-server-standalone-#.jar file provided here: http://selenium-release.storage.googleapis.com/index.html

Download and run that file, replacing # with the current server version.

java -jar selenium-server-standalone-#.jar

Then when you create a session, be sure to pass the url to where your server is running.

// This would be the url of the host running the server-standalone.jar
$host = 'http://localhost:4444/wd/hub'; // this is the default
  • Launch Firefox:

    $driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
  • Launch Chrome:

    $driver = RemoteWebDriver::create($host, DesiredCapabilities::chrome());

You can also customize the desired capabilities:

$desired_capabilities = DesiredCapabilities::firefox();
$desired_capabilities->setCapability('acceptSslCerts', false);
$driver = RemoteWebDriver::create($host, $desired_capabilities);

Changelog

For latest changes see CHANGELOG.md file.

More information

Check out the Selenium docs and wiki at http://docs.seleniumhq.org/docs/ and https://code.google.com/p/selenium/wiki

Learn how to integrate it with PHPUnit Blogpost | Demo Project

Support

We have a great community willing to try and help you!

  • Via our Facebook Group - If you have questions or are an active contributor consider joining our facebook group and contributing to the communal discussion and support.
  • Via StackOverflow - You can also ask a question or find many already answered question on StackOverflow.
  • Via GitHub - Another option if you have a question (or bug report) is to submit it here as an new issue.

Contributing

We love to have your help to make php-webdriver better. See CONTRIBUTING.md for more information about contributing and developing php-webdriver.

php-webdriver's People

Contributors

0x20h avatar akshayminocha5 avatar andrefortin avatar ashleydw avatar black-silence avatar blackakula avatar cbergau avatar danielbeardsley avatar davertmik avatar davidsickmiller avatar dgcarramona avatar dsereni avatar gfosco avatar gkralik avatar jonstjohn avatar jsifalda avatar kraigh avatar localheinz avatar martyix avatar michaelrijsdijk avatar mordred avatar okrad avatar ondram avatar phelipealves avatar sc0ttdav3y avatar sepehr avatar tobiaskappe avatar tobiaslang avatar v-slenter avatar whhone avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.