Skip to content

Commit e354269

Browse files
author
Rajesh Taneja
committed
#228 Add support to get Selenium version and browser name
1 parent 9435361 commit e354269

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/Selenium2Driver.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,27 @@ protected function setBrowserName($browserName = 'firefox')
9090
$this->browserName = $browserName;
9191
}
9292

93+
/**
94+
* Get the browser name
95+
*
96+
* @return string the name of the browser used.
97+
*/
98+
public function getBrowserName()
99+
{
100+
return $this->browserName;
101+
}
102+
103+
/**
104+
* Returns selenium version number.
105+
*
106+
* @return string selenium version.
107+
*/
108+
public function getSeleniumVersion()
109+
{
110+
$webdriverstatus = $this->webDriver->status();
111+
return $webdriverstatus['build']['version'];
112+
}
113+
93114
/**
94115
* Sets the desired capabilities - called on construction. If null is provided, will set the
95116
* defaults as desired.

0 commit comments

Comments
 (0)