PHP
$I->click('Hello');| <?php | |
| XPath::descendant('p')[1]; // | |
| XPath::descendant('p', array('@id' => 'xxx')); // .//p[@id = 'foo'] | |
| XPath::descendant('a', array('href'))->OR(XPath::attrEquals('id', $locator), XPath::contains($locator), XPath::descendant('img')->attrContains('alt', $locator)); | |
| XPath::descendant('input', array('type' => 'radio')); | |
| XPath::descendant('table')->or(array('id' => $locator, XPath::descendant('caption')->contains($locator)); | |
| // .//input[@id=//label[contains(.,'My Label')]/@for] | |
| XPath::descendant('input')->attrEquals('id', XPath::anywhere('label')->contains($label)->attr('for')); |
| // ==UserScript== | |
| // @name Bugira Script | |
| // @namespace http://use.i.E.your.homepage/ | |
| // @version 0.55 | |
| // @description injects bugira script | |
| // @match http://jswiki.codegyre.com/* | |
| // @copyright 2012+, You | |
| // ==/UserScript== | |
| // http://stackoverflow.com/questions/2246901/how-can-i-use-jquery-in-greasemonkey-scripts-in-google-chrome |
| [2012-09-26 12:32:01] LoginCept.php.INFO: click "Login" [] [] | |
| [2012-09-26 12:32:01] LoginCept.php.INFO: fill field "Username","jon" [] [] | |
| [2012-09-26 12:32:01] LoginCept.php.INFO: fill field "Password","gfhjkm" [] [] | |
| [2012-09-26 12:32:01] LoginCept.php.INFO: click "sign in" [] [] | |
| [2012-09-26 12:32:02] LoginCept.php.INFO: see "jon",".navbar" [] [] | |
| [2012-09-26 12:32:02] LoginCept.php.INFO: PASSED [] [] | |
| [2012-09-26 12:32:09] LoginCept.php.INFO: click "Login" [] [] | |
| [2012-09-26 12:32:09] LoginCept.php.INFO: fill field "Username","jon" [] [] | |
| [2012-09-26 12:32:09] LoginCept.php.INFO: fill field "Password","gfhjkm" [] [] | |
| [2012-09-26 12:32:09] LoginCept.php.INFO: click "sign in" [] [] |
| [2012-08-02 12:33:40] GenerateCeptCept.php.INFO: am in path "tests/data/sandbox" [] [] | |
| [2012-08-02 12:33:40] GenerateCeptCept.php.INFO: execute command "generate:cept dummy DummyCept" [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: see file found "DummyCept.php","tests/dummy" [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: see in this file "$I = new DumbGuy($scenario);" [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: delete this file [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: execute command "generate:cept dummy path/DummyCept" [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: see file found "DummyCept.php","tests/dummy/path" [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: delete this file [] [] | |
| [2012-08-02 12:33:41] GenerateCeptCept.php.INFO: execute command "generate:cept dummy DummyCept.php" [] [] | |
| [2012-08-02 12:33:42] GenerateCeptCept.php.INFO: see file found "DummyCept.php" [] [] |
| <?php | |
| namespace Codeception\Module; | |
| class WebHelper extends \Codeception\Module | |
| { | |
| public function seeUserAuthenticated($account, $username, $password) | |
| { | |
| $b = $this->getModule('PhpBrowser'); | |
| $b->fillField('fsaccount', $account); |
| <?php | |
| class User extends Model { | |
| // methods | |
| protected static $name = Model::String; | |
| protected static $email = Model::Email; | |
| protected static $salt = Model::String; | |
| protected static $sha = Model::String; | |
| protected static $homepage = Model::URL; |
| <?php | |
| // Framework concept | |
| // Very THIN controller + THICK model | |
| // Great for MVC frontend apps | |
| // Using models from frontend is just like using from backend | |
| class UsersController extends Users { |
| <?php | |
| class UserController extends UserCollection implements Slice\RestController { | |
| use \Slice\HttpController; | |
| use \Slice\RESTController; | |
| use \Slice\Response\ToJson; | |
| protected function action($request, $user) | |
| { | |
| if ($request->GET('/')) | |
| return $this->list($request['offset']); |
| type: rating | |
| title: JavaScript Color Pickers | |
| user: bebraw | |
| slug: javascript-color-pickers | |
| includes: [nativeColorPicker, colorjoe, Flexi Colorpicker, SimpleColor, ExColor, JavaScript Colorpicker, Farbtastic, mooRainbow, jPicker] | |
| body: | | |
| If you are building an application that deals with graphics somehow, you are likely going to need a color picker. Fortunately | |
| there are quite a few of those available for JavaScript. *HTML5 includes `color` input type even*. One color picker, aptly | |
| named **nativeColorPicker**, provides a shim for Internet Explorer so that you have got all bases covered. Other pickers | |
| available are more specialized. |