Skip to content

Commit

Permalink
fixes to webdriver
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Mar 20, 2014
1 parent 86b2ad5 commit dbcb208
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 960,7 @@ public function submitForm($selector, $params)
/** @var $form \WebDriverElement * */
foreach ($params as $param => $value) {
$els = $form->findElements(\WebDriverBy::name($param));
if (empty($el)) {
if (empty($els)) {
throw new ElementNotFound($param);
}
$el = reset($els);
Expand Down
36 changes: 35 additions & 1 deletion tests/web/WebGuy.php
Original file line number Diff line number Diff line change
@@ -1,4 1,4 @@
<?php //[STAMP] 06ef30448c90db9e8217bf742d49af0a
<?php //[STAMP] 7bd29aa990cad254ddaa24722377b0cc

// This class was automatically generated by build task
// You should not change it manually as it will be overwritten on next build
Expand Down Expand Up @@ -62,6 62,40 @@ public function amOnSubdomain($subdomain) {
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Low-level API method.
* If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly
*
* Example:
*
* ``` php
* <?php
* // from the official Guzzle manual
* $I->amGoingTo('Sign all requests with OAuth');
* $I->executeInGuzzle(function (\Guzzle\Http\Client $client) {
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(array(
* 'consumer_key' => '***',
* 'consumer_secret' => '***',
* 'token' => '***',
* 'token_secret' => '***'
* )));
* });
* ?>
* ```
*
* It is not recommended to use this command on a regular basis.
* If Codeception lacks important Guzzle Client methods, implement them and submit patches.
*
* @param callable $function
* @see \Codeception\Module\PhpBrowser::executeInGuzzle()
*/
public function executeInGuzzle($function) {
return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
Expand Down

0 comments on commit dbcb208

Please sign in to comment.