Skip to content

kevinbstack/php-selenium-browserstack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-selenium-browserstack

Prerequisites

  1. php and composer should be installed in your system
  2. Go to the directory where you have your test scripts and run the command below:
  composer require php-webdriver/webdriver

Steps to run test sessions

  1. Install dependencies
  # If you don't already use Composer, you can download the composer.phar binary:
  curl -sS https://getcomposer.org/installer | php

  # Include the binding:
  php composer.phar require browserstack/local:dev-master

  # Install all the dependencies:
  php composer.phar install

  # Test the installation by running a simple test file, check out example.php in the main repository.
  1. Configure test capabilities (To run single test, navigate to ./scripts/single.php)
$caps = array(
	'bstack:options' => array(
		"os" => "OS X",
		"osVersion" => "Sierra",
		"buildName" => "Final-Snippet-Test",
		"sessionName" => "Selenium-4 PHP snippet test",
		"local" => "false",
		"seleniumVersion" => "4.0.0",
	),
	"browserName" => "Chrome",
	"browserVersion" => "latest",
);

// Set you credentails
$BROWSERSTACK_USERNAME = "BROWSERSTACK_USERNAME";
$BROWSERSTACK_ACCESS_KEY = "BROWSERSTACK_ACCESS_KEY";

To run tests

Single test

Run single test session by running.

php single.php

Local test

Run local test session by running.

# Update "BROWSERSTACK_ACCESS_KEY" in bs_local.
$bs_local_args = array("key" => "ACCESS_KEY");
php local.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%