Created
January 9, 2013 19:36
-
-
Save kallepersson/4496119 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Yii::import( 'ext.webdriver-bindings.CWebDriverTestCase' ); | |
| class ExampleTest extends CWebDriverTestCase { | |
| public function testGoogle() { | |
| $this->get( 'http://www.google.com/' ); | |
| $qElem = $this->findElementBy( LocatorStrategy::name, 'q' ); | |
| $this->assertNotNull( $qElem, 'There is no "query" element!' ); | |
| $qElem->sendKeys( array( 'yii framework' ) ); | |
| $qElem->submit(); | |
| sleep( 1 ); | |
| $elem = $this->findElementBy( LocatorStrategy::className, 'vsc' ); | |
| $this->assertNotNull( $elem, 'Results not found!' ); | |
| $this->assertTrue( $this->isTextPresent( 'Yii Framework' ), 'The is no "Yii Framework" text on result page!' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment