Skip to content

Commit 51447ee

Browse files
committed
Allow the option to choose the browser list to get
As noted here https://saucelabs.com/docs/rest#information ``` Returns an array of strings corresponding to all the browsers currently supported on Sauce Labs. (Choose the termination that defines which list you need, bearing in mind that Selenium 1 [RC] and 2 [WebDriver] are compatible with different browser/OS combinations.) Relative URLs: /info/browsers/all, /selenium-rc, /webdriver ```
1 parent 786ba0d commit 51447ee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/WebDriver/SauceLabs/SauceRest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,13 @@ public function getStatus()
269269
*
270270
* @return array
271271
*/
272-
public function getBrowsers()
272+
public function getBrowsers($browser = FALSE)
273273
{
274-
return $this->execute('GET', 'info/browsers');
274+
if($browser) {
275+
return $this->execute('GET', 'info/browsers/' . $browser);
276+
} else {
277+
return $this->execute('GET', 'info/browsers');
278+
}
275279
}
276280

277281
/**

0 commit comments

Comments
 (0)