From 123c43c27cf21e1d86870d8e17295eced24901f3 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Mon, 8 Feb 2016 16:49:28 +0800 Subject: [PATCH] Fix #228: Add support to get driver status and browser name --- src/Selenium2Driver.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index 58b5102d..581b9b0d 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -90,6 +90,26 @@ protected function setBrowserName($browserName = 'firefox') $this->browserName = $browserName; } + /** + * Get the browser name + * + * @return string the name of the browser used. + */ + public function getBrowserName() + { + return $this->browserName; + } + + /** + * Returns driver status. + * + * @return array driver status. + */ + public function getStatus() + { + return $this->webDriver->status(); + } + /** * Sets the desired capabilities - called on construction. If null is provided, will set the * defaults as desired.